From 80924959c4f41bcebe7b7c667f2d7489bf8fcb74 Mon Sep 17 00:00:00 2001 From: Tanin Rojanapiansatith Date: Fri, 21 Oct 2016 00:35:55 +0100 Subject: Clarify how to open ~/.zshrc file in README.md Closes #5558 --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 0e39f4c55..eecde1551 100644 --- a/README.md +++ b/README.md @@ -49,9 +49,9 @@ Oh My Zsh comes with a shit load of plugins to take advantage of. You can take a #### Enabling Plugins -If you spot a plugin (or several) that you would like to use with Oh My Zsh, you will need to edit the `~/.zshrc` file. Once you open it with your favorite editor, you'll see a spot to list all the plugins that you'd like Oh My Zsh to load on initialization. +Once you spot a plugin (or several) that you'd like to use with Oh My Zsh, you'll need to enable them in the `.zshrc` file. You'll find the zshrc file in your `$HOME` directory. Open it with your favorite text editor and you'll see a spot to list all the plugins you want to load. -For example, this line might begin to look like... +For example, this line might begin to look like this: ```shell plugins=(git bundler osx rake ruby) -- cgit v1.2.3-70-g09d2 From d47a7221924b4fa0b1859913d505f50a6c276da1 Mon Sep 17 00:00:00 2001 From: Marco De Bortoli Date: Tue, 1 Nov 2016 15:49:50 +1100 Subject: PHP suffix alias should be removed PHP can be executed as CLI script but due to the automated attempt to add browser support to that extension such ability is prevented in certain circumstances. --- plugins/common-aliases/common-aliases.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 128db6e5f..0908c8a38 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -54,7 +54,7 @@ alias mv='mv -i' # depends on the SUFFIX :) if is-at-least 4.2.0; then # open browser on urls - _browser_fts=(htm html de org net com at cx nl se dk dk php) + _browser_fts=(htm html de org net com at cx nl se dk dk) for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex) -- cgit v1.2.3-70-g09d2 From fc4e0cd7ba47bc87fe707f2bac8edb3461cfdd36 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 2 Nov 2016 11:02:58 +0100 Subject: common-aliases: check if $BROWSER is defined on browser aliases --- plugins/common-aliases/common-aliases.plugin.zsh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 0908c8a38..e888ff076 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -54,8 +54,10 @@ alias mv='mv -i' # depends on the SUFFIX :) if is-at-least 4.2.0; then # open browser on urls - _browser_fts=(htm html de org net com at cx nl se dk dk) - for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done + if [[ -n "$BROWSER" ]]; then + _browser_fts=(htm html de org net com at cx nl se dk dk) + for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done + fi _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex) for ft in $_editor_fts ; do alias -s $ft=$EDITOR ; done -- cgit v1.2.3-70-g09d2 From cb26c2f6145ab36a2bb3b3d5392959cf741f2608 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 2 Nov 2016 11:03:47 +0100 Subject: common-aliases: minor style fixes --- plugins/common-aliases/common-aliases.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index e888ff076..d47b20e40 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -56,17 +56,17 @@ if is-at-least 4.2.0; then # open browser on urls if [[ -n "$BROWSER" ]]; then _browser_fts=(htm html de org net com at cx nl se dk dk) - for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done + for ft in $_browser_fts; do alias -s $ft=$BROWSER; done fi _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex) - for ft in $_editor_fts ; do alias -s $ft=$EDITOR ; done + for ft in $_editor_fts; do alias -s $ft=$EDITOR; done _image_fts=(jpg jpeg png gif mng tiff tif xpm) - for ft in $_image_fts ; do alias -s $ft=$XIVIEWER; done + for ft in $_image_fts; do alias -s $ft=$XIVIEWER; done _media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm) - for ft in $_media_fts ; do alias -s $ft=mplayer ; done + for ft in $_media_fts; do alias -s $ft=mplayer; done #read documents alias -s pdf=acroread -- cgit v1.2.3-70-g09d2 From 0f62b7a8d8708910e75fedb9d7b8e3d8559a34da Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 2 Nov 2016 11:17:58 +0100 Subject: common-aliases: check if `$XIVIEWER` is defined and minor fixes --- plugins/common-aliases/common-aliases.plugin.zsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index d47b20e40..742798f27 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -55,15 +55,17 @@ alias mv='mv -i' if is-at-least 4.2.0; then # open browser on urls if [[ -n "$BROWSER" ]]; then - _browser_fts=(htm html de org net com at cx nl se dk dk) + _browser_fts=(htm html de org net com at cx nl se dk) for ft in $_browser_fts; do alias -s $ft=$BROWSER; done fi _editor_fts=(cpp cxx cc c hh h inl asc txt TXT tex) for ft in $_editor_fts; do alias -s $ft=$EDITOR; done - _image_fts=(jpg jpeg png gif mng tiff tif xpm) - for ft in $_image_fts; do alias -s $ft=$XIVIEWER; done + if [[ -n "$XIVIEWER" ]]; then + _image_fts=(jpg jpeg png gif mng tiff tif xpm) + for ft in $_image_fts; do alias -s $ft=$XIVIEWER; done + fi _media_fts=(ape avi flv m4a mkv mov mp3 mpeg mpg ogg ogm rm wav webm) for ft in $_media_fts; do alias -s $ft=mplayer; done @@ -85,4 +87,3 @@ fi # Make zsh know about hosts already accessed by SSH zstyle -e ':completion:*:(ssh|scp|sftp|rsh|rsync):hosts' hosts 'reply=(${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) /dev/null)"}%%[# ]*}//,/ })' - -- cgit v1.2.3-70-g09d2 From 73591101b6db1e67ad3a0c2f90c81bc8174f4056 Mon Sep 17 00:00:00 2001 From: psprint Date: Wed, 2 Nov 2016 13:08:58 +0100 Subject: znt: Update to v2.2.7 (#5576) --- plugins/zsh-navigation-tools/NEWS | 17 +++++++ plugins/zsh-navigation-tools/README.md | 54 ++++++++++++++++++++++ plugins/zsh-navigation-tools/n-history | 32 +++++++++---- plugins/zsh-navigation-tools/n-list | 3 +- plugins/zsh-navigation-tools/znt-tmux.zsh | 50 ++++++++++++++++++++ .../zsh-navigation-tools.plugin.zsh | 35 ++++++++------ 6 files changed, 167 insertions(+), 24 deletions(-) create mode 100644 plugins/zsh-navigation-tools/NEWS create mode 100755 plugins/zsh-navigation-tools/znt-tmux.zsh diff --git a/plugins/zsh-navigation-tools/NEWS b/plugins/zsh-navigation-tools/NEWS new file mode 100644 index 000000000..acd9f2ebc --- /dev/null +++ b/plugins/zsh-navigation-tools/NEWS @@ -0,0 +1,17 @@ +------------------------------------- +CHANGES FROM PREVIOUS VERSIONS OF ZNT +------------------------------------- + +Changes from 2.2.1 to 2.2.7 +--------------------------- + +Tmux integration has been added – bind file znt-tmux.zsh in Tmux as +described in README.md and e.g. run local history on remote hosts. Tmux +opens new window with n-history, and pastes selected history entry into +immediate previous window (e.g. a remote session). Fixed plugin.zsh file +to not use (outer scope) positional parameters. This fixes problem with +Grlm's Zsh configuration. The file now doesn't use "test" builtin (but +[[ instead), because it can be shadowed by alias or command. Private +history has been fixed to not overwrite its history file with the same +content. This improves performance when switching to private history +view. diff --git a/plugins/zsh-navigation-tools/README.md b/plugins/zsh-navigation-tools/README.md index 7a679fe67..ed532a161 100644 --- a/plugins/zsh-navigation-tools/README.md +++ b/plugins/zsh-navigation-tools/README.md @@ -34,6 +34,60 @@ want to copy your previous data (from e.g. ~/.zhistory) into the new location. ## News +* 06-10-2016 + - Tmux-integration – Ctrl-b-h in Tmux to open n-history in new window. + Then select history entry, it will be copied to the original Tmux window. + Use this to execute local commands on remote hosts. All that is needed is + this line added to ~/.tmux.conf: + + bind h run-shell -b "$ZNT_REPO_DIR/znt-tmux.zsh" + +* 16-05-2016 + - n-kill has completion. It proposes *words* from what's in `ps -A`. Giving n-kill + arguments means grepping – it will start only with matching `ps` entries. + +* 15-05-2016 + - Fixed problem where zsh-syntax-highlighting could render n-history slow (for + long history entries). + +* 14-05-2016 + - Configuration can be set from zshrc. Example: + + znt_list_instant_select=1 + znt_list_border=0 + znt_list_bold=1 + znt_list_colorpair="green/black" + znt_functions_keywords=( "zplg" "zgen" "match" ) + znt_cd_active_text="underline" + znt_env_nlist_coloring_color=$'\x1b[00;33m' + znt_cd_hotlist=( "~/.config/znt" "/usr/share/zsh/site-functions" "/usr/share/zsh" + "/usr/local/share/zsh/site-functions" "/usr/local/share/zsh" + "/usr/local/bin" ) + +* 10-05-2016 + - Search query rotation – use Ctrl-A to rotate entered words right. + Words `1 2 3` become `3 1 2`. + +* 09-05-2016 + - New feature: n-help tool, available also from n-history via H key. It + displays help screen with various information on ZNT. + +* 08-05-2016 + - Approximate matching – pressing f or Ctrl-F will enter FIX mode, in + which 1 or 2 errors are allowed in what is searched. This utilizes + original Zsh approximate matching features and is intended to be used + after entering search query, when a typo is discovered. + +* 06-05-2016 + - Private history can be edited. Use e key or Ctrl-E for that when in + n-history. Your $EDITOR will start. This is a way to have handy set + of bookmarks prepared in private history's file. + - Border can be disabled. Use following snippet in ~/.config/znt/n-list.conf + or any other tool-targetted config file: + + # Should draw the border? + local border=0 + * 30-04-2016 - New feature: color themes. Use Ctrl-T and Ctrl-G to browse predefined themes. They are listed in ~/.config/znt/n-list.conf. Use the file to diff --git a/plugins/zsh-navigation-tools/n-history b/plugins/zsh-navigation-tools/n-history index af475dcb8..b425ecd10 100644 --- a/plugins/zsh-navigation-tools/n-history +++ b/plugins/zsh-navigation-tools/n-history @@ -307,7 +307,7 @@ while (( 1 )); do elif [ "$active_view" = "1" ]; then if [ -s "$private_history_db" ]; then local title=$'\x1b[00;32m'"Private history:"$'\x1b[00;00m\0' - () { fc -ap -R "$private_history_db"; list=( "$title" ${history[@]} ) } + () { fc -Rap "$private_history_db" 20000 0; list=( "$title" ${history[@]} ) } else list=( "Private history - history entries selected via this tool will be put here" ) fi @@ -335,21 +335,37 @@ done if [ "$REPLY" -gt 0 ]; then selected="$reply[REPLY]" + + # Append to private history + if [[ "$active_view" = "0" ]]; then + local newline=$'\n' + local selected_ph="${selected//$newline/\\$newline}" + print -r -- "$selected_ph" >> "$private_history_db" + fi + + # TMUX? + if [[ "$ZNT_TMUX_MODE" = "1" ]]; then + tmux send -t "$ZNT_TMUX_ORIGIN_SESSION:$ZNT_TMUX_ORIGIN_WINDOW.$ZNT_TMUX_ORIGIN_PANE" "$selected" + tmux kill-window + return 0 # ZLE? - if [ "${(t)CURSOR}" = "integer-local-special" ]; then + elif [ "${(t)CURSOR}" = "integer-local-special" ]; then zle .redisplay zle .kill-buffer LBUFFER+="$selected" - - # Append to private history - local newline=$'\n' - selected="${selected//$newline/\\$newline}" - [ "$active_view" = "0" ] && print -r -- "$selected" >> "$private_history_db" else print -zr -- "$selected" fi else - [ "${(t)CURSOR}" = "integer-local-special" ] && zle redisplay + # TMUX? + if [[ "$ZNT_TMUX_MODE" = "1" ]]; then + tmux kill-window + # ZLE? + elif [[ "${(t)CURSOR}" = "integer-local-special" ]]; then + zle redisplay + fi fi +return 0 + # vim: set filetype=zsh: diff --git a/plugins/zsh-navigation-tools/n-list b/plugins/zsh-navigation-tools/n-list index f3d2e5b3e..3fe5542a6 100644 --- a/plugins/zsh-navigation-tools/n-list +++ b/plugins/zsh-navigation-tools/n-list @@ -310,8 +310,9 @@ while (( 1 )); do colsearch_pattern="${search_buffer// ##/|(#a2)}" list=( "${(@M)list:#(#ia2)*$~search_pattern*}" ) else - # Patterns will be *foo*~^*bar* and (foo|bar) + # Pattern will be *foo*~^*bar* (inventor: Mikael Magnusson) search_pattern="${search_buffer// ##/*~^*}" + # Pattern will be (foo|bar) colsearch_pattern="${search_buffer// ##/|}" list=( "${(@M)list:#(#i)*$~search_pattern*}" ) fi diff --git a/plugins/zsh-navigation-tools/znt-tmux.zsh b/plugins/zsh-navigation-tools/znt-tmux.zsh new file mode 100755 index 000000000..6a96e97a1 --- /dev/null +++ b/plugins/zsh-navigation-tools/znt-tmux.zsh @@ -0,0 +1,50 @@ +#!/usr/bin/env zsh + +# Copyright (c) 2016, Zsolt Lengyel +# Modifications copyright (c) 2016, Sebastian Gniazdowski + +# +# This script opens a new, temporary tmux pane and runs n-history. When +# a selection is made, the result (history entry) is pasted back into +# original tmux pane, and the temporary pane is closed. This allows to +# use local history on remote machines. +# +# To use, put this line to your ~/.tmux.conf. The tool is invoked with: +# Ctrl+b h +# +# bind h run-shell -b "$ZNT_REPO_DIR/znt-tmux.zsh" +# + +# get and save the current active tmux pane id +active_pane=$(tmux display -p -F ':#{session_id}:#I:#P:#{pane_active}:#{window_active}:#{session_attached}' ) +a_active_pane=("${(@s/:/)active_pane}") + +active_session=${a_active_pane[2]//$} +active_window=$a_active_pane[3] +active_pane=$a_active_pane[4] + +# set variables for upcoming window +tmux setenv -t $active_session:$active_window.$active_pane "ZNT_TMUX_MODE" 1 +tmux setenv -t $active_session:$active_window.$active_pane "ZNT_TMUX_ORIGIN_SESSION" "$active_session" +tmux setenv -t $active_session:$active_window.$active_pane "ZNT_TMUX_ORIGIN_WINDOW" "$active_window" +tmux setenv -t $active_session:$active_window.$active_pane "ZNT_TMUX_ORIGIN_PANE" "$active_pane" + +# create a new window in the active session and call it znt-hist +tmux new-window -t $active_session: -n znt-hist + +# unset the variables, so only above single window has them +tmux setenv -u -t $active_session:$active_window.$active_pane "ZNT_TMUX_MODE" +tmux setenv -u -t $active_session:$active_window.$active_pane "ZNT_TMUX_ORIGIN_SESSION" +tmux setenv -u -t $active_session:$active_window.$active_pane "ZNT_TMUX_ORIGIN_WINDOW" +tmux setenv -u -t $active_session:$active_window.$active_pane "ZNT_TMUX_ORIGIN_PANE" + +# znt's session id +znt_active_pane=$(tmux display -p -F ':#{session_id}:#I:#P:#{pane_active}:#{window_active}:#{session_attached}' ) +znt_a_active_pane=("${(@s/:/)znt_active_pane}") + +znt_active_session=${znt_a_active_pane[2]//$} +znt_active_window=$znt_a_active_pane[3] +znt_active_pane=$znt_a_active_pane[4] + +# call znt +tmux send -t "$znt_active_session:$znt_active_window.$znt_active_pane" n-history ENTER diff --git a/plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh b/plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh index b26549152..32b4ca064 100755 --- a/plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh +++ b/plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh @@ -1,38 +1,43 @@ #!/usr/bin/env zsh -REPO_DIR="${0%/*}" -CONFIG_DIR="$HOME/.config/znt" +0="${(%):-%N}" # this gives immunity to functionargzero being unset +export ZNT_REPO_DIR="${0%/*}" +export ZNT_CONFIG_DIR="$HOME/.config/znt" # # Copy configs # -if ! test -d "$HOME/.config"; then - mkdir "$HOME/.config" +if [[ ! -d "$HOME/.config" ]]; then + command mkdir "$HOME/.config" fi -if ! test -d "$CONFIG_DIR"; then - mkdir "$CONFIG_DIR" +if [[ ! -d "$ZNT_CONFIG_DIR" ]]; then + command mkdir "$ZNT_CONFIG_DIR" fi # 9 files -set n-aliases.conf n-env.conf n-history.conf n-list.conf n-panelize.conf n-cd.conf n-functions.conf n-kill.conf n-options.conf +unset __ZNT_CONFIG_FILES +typeset -ga __ZNT_CONFIG_FILES +set +A __ZNT_CONFIG_FILES n-aliases.conf n-env.conf n-history.conf n-list.conf n-panelize.conf n-cd.conf n-functions.conf n-kill.conf n-options.conf # Check for random 2 files if they exist # This will shift 0 - 7 elements -shift $(( RANDOM % 8 )) -if ! test -f "$CONFIG_DIR/$1" || ! test -f "$CONFIG_DIR/$2"; then +shift $(( RANDOM % 8 )) __ZNT_CONFIG_FILES +if [[ ! -f "$ZNT_CONFIG_DIR/${__ZNT_CONFIG_FILES[1]}" || ! -f "$ZNT_CONFIG_DIR/${__ZNT_CONFIG_FILES[2]}" ]]; then # Something changed - examine every file - set n-aliases.conf n-env.conf n-history.conf n-list.conf n-panelize.conf n-cd.conf n-functions.conf n-kill.conf n-options.conf - for i; do - if ! test -f "$CONFIG_DIR/$i"; then - cp "$REPO_DIR/.config/znt/$i" "$CONFIG_DIR" + set +A __ZNT_CONFIG_FILES n-aliases.conf n-env.conf n-history.conf n-list.conf n-panelize.conf n-cd.conf n-functions.conf n-kill.conf n-options.conf + unset __ZNT_CONFIG_FILE + typeset -g __ZNT_CONFIG_FILE + for __ZNT_CONFIG_FILE in "${__ZNT_CONFIG_FILES[@]}"; do + if [[ ! -f "$ZNT_CONFIG_DIR/$__ZNT_CONFIG_FILE" ]]; then + command cp "$ZNT_REPO_DIR/.config/znt/$__ZNT_CONFIG_FILE" "$ZNT_CONFIG_DIR" fi done + unset __ZNT_CONFIG_FILE fi -# Don't leave positional parameters being set -set -- +unset __ZNT_CONFIG_FILES # # Load functions -- cgit v1.2.3-70-g09d2 From 1b799e9762067f912c0eb807cd5a55d8f122adfd Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 2 Nov 2016 15:39:28 +0100 Subject: Check dircolors settings before using gls on darwin (#5570) `gls` seems to be installed by default or on most macOS systems, but its default color scheme sucks. This fix will make sure to only use it if it has been customised prior to running OMZ. Related: #5516, #5520. --- lib/theme-and-appearance.zsh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index 467b770d6..122e3fecb 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -4,6 +4,8 @@ autoload -U colors && colors # Enable ls colors export LSCOLORS="Gxfxcxdxbxegedabagacad" +# TODO organise this chaotic logic + if [[ "$DISABLE_LS_COLORS" != "true" ]]; then # Find the option for using colors in ls, depending on the version if [[ "$OSTYPE" == netbsd* ]]; then @@ -18,7 +20,12 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then gls --color -d . &>/dev/null && alias ls='gls --color=tty' colorls -G -d . &>/dev/null && alias ls='colorls -G' elif [[ "$OSTYPE" == darwin* ]]; then - gls --color -d . &>/dev/null && alias ls='gls --color=tty' || alias ls='ls -G' + # this is a good alias, it works by default just using $LSCOLORS + alias ls='ls -G' + + # only use coreutils ls if there is a dircolors customization present ($LS_COLORS or .dircolors file) + # otherwise, gls will use the default color scheme which is ugly af + [[ -n "$LS_COLORS" || -f "$HOME/.dircolors" ]] && gls --color -d . &>/dev/null && alias ls='gls --color=tty' else # For GNU ls, we use the default ls color theme. They can later be overwritten by themes. if [[ -z "$LS_COLORS" ]]; then -- cgit v1.2.3-70-g09d2 From 40544a1d5d1a55f88c226213fe464ede8b454fec Mon Sep 17 00:00:00 2001 From: Eduardo Cuomo Date: Sun, 10 Apr 2016 13:20:59 -0300 Subject: Fix invalid "ls -G" alias. --- lib/theme-and-appearance.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index 122e3fecb..f368a48f0 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -21,7 +21,7 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then colorls -G -d . &>/dev/null && alias ls='colorls -G' elif [[ "$OSTYPE" == darwin* ]]; then # this is a good alias, it works by default just using $LSCOLORS - alias ls='ls -G' + ls -G . &>/dev/null && alias ls='ls -G' # only use coreutils ls if there is a dircolors customization present ($LS_COLORS or .dircolors file) # otherwise, gls will use the default color scheme which is ugly af @@ -32,7 +32,7 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then (( $+commands[dircolors] )) && eval "$(dircolors -b)" fi - ls --color -d . &>/dev/null && alias ls='ls --color=tty' || alias ls='ls -G' + ls --color -d . &>/dev/null && alias ls='ls --color=tty' || ls -G . &>/dev/null && alias ls='ls -G' # Take advantage of $LS_COLORS for completion as well. zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" -- cgit v1.2.3-70-g09d2 From cf37697920019c44245ba3e5b69fed68c8c3fff4 Mon Sep 17 00:00:00 2001 From: Sachin George Thomas Date: Wed, 2 Nov 2016 20:22:14 +0530 Subject: node: open module-specific node documentation (#5572) --- plugins/node/node.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh index 2463815ac..e2f18a032 100644 --- a/plugins/node/node.plugin.zsh +++ b/plugins/node/node.plugin.zsh @@ -1,5 +1,6 @@ # Open the node api for your current version to the optional section. # TODO: Make the section part easier to use. function node-docs { - open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1" + local section=${1:-all} + open_command "http://nodejs.org/docs/$(node --version)/api/$section.html" } -- cgit v1.2.3-70-g09d2 From b94d9e26e534c9729e8a9401a37e7a5b0906f0d5 Mon Sep 17 00:00:00 2001 From: Timothy Blumberg Date: Wed, 2 Nov 2016 12:53:54 -0400 Subject: Changed dsa --> rsa in zshrc.zsh-template file (#5603) --- templates/zshrc.zsh-template | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 00d25bc93..af42e5b9f 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -73,7 +73,7 @@ source $ZSH/oh-my-zsh.sh # export ARCHFLAGS="-arch x86_64" # ssh -# export SSH_KEY_PATH="~/.ssh/dsa_id" +# export SSH_KEY_PATH="~/.ssh/rsa_id" # Set personal aliases, overriding those provided by oh-my-zsh libs, # plugins, and themes. Aliases can be placed here, though oh-my-zsh -- cgit v1.2.3-70-g09d2 From 0b340bc3a5c58609a07987b296f773eaea17b274 Mon Sep 17 00:00:00 2001 From: "mingang.he" Date: Thu, 3 Nov 2016 21:10:08 +0800 Subject: Fix #5604: No DIR ( directory ) colors (#5605) --- lib/theme-and-appearance.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index f368a48f0..96f34aa81 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -32,7 +32,7 @@ if [[ "$DISABLE_LS_COLORS" != "true" ]]; then (( $+commands[dircolors] )) && eval "$(dircolors -b)" fi - ls --color -d . &>/dev/null && alias ls='ls --color=tty' || ls -G . &>/dev/null && alias ls='ls -G' + ls --color -d . &>/dev/null && alias ls='ls --color=tty' || { ls -G . &>/dev/null && alias ls='ls -G' } # Take advantage of $LS_COLORS for completion as well. zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}" -- cgit v1.2.3-70-g09d2