diff --git a/modules/completion/external b/modules/completion/external index 9ef8d2f088..2166ab8a6c 160000 --- a/modules/completion/external +++ b/modules/completion/external @@ -1 +1 @@ -Subproject commit 9ef8d2f088d302fdedfa89b9cfd88ef926166a7c +Subproject commit 2166ab8a6c57d1d9115e34f51c3dc05ba15480c5 diff --git a/modules/completion/init.zsh b/modules/completion/init.zsh index de59a5d29c..042e1a0330 100644 --- a/modules/completion/init.zsh +++ b/modules/completion/init.zsh @@ -96,7 +96,7 @@ zstyle ':completion::*:(-command-|export):*' fake-parameters ${${${_comps[(I)-va # Populate hostname completion. zstyle -e ':completion:*:hosts' hosts 'reply=( - ${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) 2>/dev/null)"}%%[#| ]*}//,/ } + ${=${=${=${${(f)"$(cat {/etc/ssh_,~/.ssh/known_}hosts(|2)(N) 2>/dev/null)"}%%[#| ]*}//\]:[0-9]*/ }//,/ }//\[/ } ${=${(f)"$(cat /etc/hosts(|)(N) <<(ypcat hosts 2>/dev/null))"}%%\#*} ${=${${${${(@M)${(f)"$(cat ~/.ssh/config 2>/dev/null)"}:#Host *}#Host }:#*\**}:#*\?*}} )' @@ -144,8 +144,8 @@ fi # SSH/SCP/RSYNC zstyle ':completion:*:(scp|rsync):*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' zstyle ':completion:*:(scp|rsync):*' group-order users files all-files hosts-domain hosts-host hosts-ipaddr -zstyle ':completion:*:ssh:*' tag-order users 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' -zstyle ':completion:*:ssh:*' group-order hosts-domain hosts-host users hosts-ipaddr +zstyle ':completion:*:ssh:*' tag-order 'hosts:-host:host hosts:-domain:domain hosts:-ipaddr:ip\ address *' +zstyle ':completion:*:ssh:*' group-order users hosts-domain hosts-host users hosts-ipaddr zstyle ':completion:*:(ssh|scp|rsync):*:hosts-host' ignored-patterns '*(.|:)*' loopback ip6-loopback localhost ip6-localhost broadcasthost zstyle ':completion:*:(ssh|scp|rsync):*:hosts-domain' ignored-patterns '<->.<->.<->.<->' '^[-[:alnum:]]##(.[-[:alnum:]]##)##' '*@*' zstyle ':completion:*:(ssh|scp|rsync):*:hosts-ipaddr' ignored-patterns '^(<->.<->.<->.<->|(|::)([[:xdigit:].]##:(#c,2))##(|%*))' '127.0.0.<->' '255.255.255.255' '::1' 'fe80::*' diff --git a/modules/editor/init.zsh b/modules/editor/init.zsh index 532929234f..ae253f25c1 100644 --- a/modules/editor/init.zsh +++ b/modules/editor/init.zsh @@ -270,10 +270,6 @@ bindkey -M vicmd "v" edit-command-line bindkey -M vicmd "u" undo bindkey -M vicmd "$key_info[Control]R" redo -# Switch to command mode. -bindkey -M viins "jk" vi-cmd-mode -bindkey -M viins "kj" vi-cmd-mode - if (( $+widgets[history-incremental-pattern-search-backward] )); then bindkey -M vicmd "?" history-incremental-pattern-search-backward bindkey -M vicmd "/" history-incremental-pattern-search-forward diff --git a/modules/git/README.md b/modules/git/README.md index 806bc9ca15..6eeb3216be 100644 --- a/modules/git/README.md +++ b/modules/git/README.md @@ -56,6 +56,7 @@ Aliases - `gcO` checks out paths to work tree using the *HEAD* commit. - `gcf` amends the tip of the current branch using the same log message as *HEAD*. + - `gcF` amends the tip of the current branch. - `gcp` applies changes introduced by existing commits. - `gcP` applies changes introduced by existing commits without committing. - `gcr` reverts existing commits by reverting patches and recording new @@ -292,7 +293,7 @@ Second, format how the above attributes are displayed in prompts. 'prompt' ' git(%b)' \ 'rprompt' '[%R]' -Last, add `$git_info[prompt]` to `$PROMPT` and `$git_info[prompt]` to +Last, add `$git_info[prompt]` to `$PROMPT` and `$git_info[rprompt]` to `$RPROMPT` respectively and call `git-info` in the `prompt_name_preexec` hook function. diff --git a/modules/git/alias.zsh b/modules/git/alias.zsh index 8d84d92387..9af1c8a755 100644 --- a/modules/git/alias.zsh +++ b/modules/git/alias.zsh @@ -48,6 +48,7 @@ alias gcm='git commit --message' alias gco='git checkout' alias gcO='git checkout HEAD --' alias gcf='git commit --amend --reuse-message HEAD' +alias gcF='git commit --amend' alias gcp='git cherry-pick --ff' alias gcP='git cherry-pick --no-commit' alias gcr='git revert' diff --git a/modules/gnu-utility/README.md b/modules/gnu-utility/README.md index b0dc1eedb1..b3b6ded1df 100644 --- a/modules/gnu-utility/README.md +++ b/modules/gnu-utility/README.md @@ -7,8 +7,8 @@ Installing GNU utilities on non-GNU systems in `$PATH` without a prefix, i.e. `ls` instead of `gls`, is not recommended since scripts that target other utilities will be broken. -However, for interactive use, prefixed commands can be wrapped in their -non-prefixed counterparts. +This module wraps GNU utilities in functions without a prefix for interactive +use. This module must be loaded **before** the *utility* module. diff --git a/modules/ruby/init.zsh b/modules/ruby/init.zsh index b5ab77d0dd..b287cbb2c8 100644 --- a/modules/ruby/init.zsh +++ b/modules/ruby/init.zsh @@ -17,11 +17,11 @@ if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then # Load manually installed rbenv into the shell session. elif [[ -s "$HOME/.rbenv/bin/rbenv" ]]; then path=("$HOME/.rbenv/bin" $path) - eval "$(rbenv init - zsh)" + eval "$(rbenv init - --no-rehash zsh)" # Load package manager installed rbenv into the shell session. elif (( $+commands[rbenv] )); then - eval "$(rbenv init - zsh)" + eval "$(rbenv init - --no-rehash zsh)" # Install local gems according to operating system conventions. else diff --git a/modules/syntax-highlighting/external b/modules/syntax-highlighting/external index 45194671af..a0862053f5 160000 --- a/modules/syntax-highlighting/external +++ b/modules/syntax-highlighting/external @@ -1 +1 @@ -Subproject commit 45194671af8e1d6b37b16e214a58674762ab8e49 +Subproject commit a0862053f57e3d8d6e0dbc34e55be13d9e4fb668 diff --git a/runcoms/zlogin b/runcoms/zlogin index f99ac5f1b8..a639d52d94 100644 --- a/runcoms/zlogin +++ b/runcoms/zlogin @@ -9,7 +9,7 @@ { # Compile the completion dump to increase startup speed. zcompdump="${ZDOTDIR:-$HOME}/.zcompdump" - if [[ "$zcompdump" -nt "${zcompdump}.zwc" || ! -s "${zcompdump}.zwc" ]]; then + if [[ -s "$zcompdump" && (! -s "${zcompdump}.zwc" || "$zcompdump" -nt "${zcompdump}.zwc") ]]; then zcompile "$zcompdump" fi