diff options
author | Robby Russell <robby@planetargon.com> | 2014-08-31 10:45:40 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2014-08-31 10:45:40 -0700 |
commit | fcd55f3a9202ca8d47a82b4a0274bdd114d745d1 (patch) | |
tree | 2fcb38a80e64ecc1138317dd0cbeef9f31e8cfeb /plugins/wd/_wd.sh | |
parent | 958c8f439058c2c253434a0860d29bf6c11cd559 (diff) | |
parent | 346f6b7d24d6021efa8c5167088f98c10f00ad3f (diff) | |
download | zsh-fcd55f3a9202ca8d47a82b4a0274bdd114d745d1.tar.gz zsh-fcd55f3a9202ca8d47a82b4a0274bdd114d745d1.tar.bz2 zsh-fcd55f3a9202ca8d47a82b4a0274bdd114d745d1.zip |
Merge pull request #2845 from mfaerevaag/master
[wd] New minor release
Diffstat (limited to 'plugins/wd/_wd.sh')
-rw-r--r-- | plugins/wd/_wd.sh | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/plugins/wd/_wd.sh b/plugins/wd/_wd.sh index 29df63520..0b03d8fff 100644 --- a/plugins/wd/_wd.sh +++ b/plugins/wd/_wd.sh @@ -5,23 +5,16 @@ zstyle ':completion::complete:wd:*:commands' group-name commands zstyle ':completion::complete:wd:*:warp_points' group-name warp_points zstyle ':completion::complete:wd::' list-grouped -# Call `_wd()` when when trying to complete the command `wd` - zmodload zsh/mapfile + function _wd() { - local ret=1 local CONFIG=$HOME/.warprc - - # Stolen from - # http://stackoverflow.com/questions/9000698/completion-when-program-has-sub-commands - - # local curcontext="$curcontext" state line - # typeset -A opt_args + local ret=1 local -a commands local -a warp_points - warp_points=( "${(f)mapfile[$CONFIG]}" ) - # LIST="${mapfile[$FNAME]}" # Not required unless stuff uses it + + warp_points=( "${(f)mapfile[$CONFIG]//$HOME/~}" ) commands=( 'add:Adds the current working directory to your warp points' |