summary refs log tree commit diff
diff options
context:
space:
mode:
authorOliver Kiddle <okiddle@yahoo.co.uk>2014-02-20 14:54:58 +0100
committerOliver Kiddle <opk@zsh.org>2014-02-25 09:02:19 +0100
commit7c314132789aa2b7a571890eca06d3f1e22d0f0e (patch)
tree34e933d0fe7051fa41ba55d76d6aa5d699bcffff
parent079540cc7859ad73c0ccfb6db8ad3aa138037925 (diff)
downloadzsh-7c314132789aa2b7a571890eca06d3f1e22d0f0e.tar.gz
zsh-7c314132789aa2b7a571890eca06d3f1e22d0f0e.tar.xz
zsh-7c314132789aa2b7a571890eca06d3f1e22d0f0e.zip
users/18498: observe add-space style in _expand_alias so suffix can be disabled
-rw-r--r--ChangeLog3
-rw-r--r--Completion/Base/Completer/_expand_alias5
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index f9e7f1690..27b5e9a80 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2014-02-24  Oliver Kiddle <opk@zsh.org>
 
+	* users/18498: Completion/Base/Completer/_expand_alias: observe
+	add-space style in _expand_alias so suffix can be disabled
+
 	* users/18485: Completion/Unix/Command/_git: add .. as an
 	auto-removable suffix in git revision ranges
 
diff --git a/Completion/Base/Completer/_expand_alias b/Completion/Base/Completer/_expand_alias
index 8848e668d..8240e4162 100644
--- a/Completion/Base/Completer/_expand_alias
+++ b/Completion/Base/Completer/_expand_alias
@@ -1,7 +1,7 @@
 #compdef -K _expand_alias complete-word \C-xa
 
 local word expl tmp pre sel what
-local -a tmpa
+local -a tmpa suf
 
 eval "$_comp_setup"
 
@@ -58,7 +58,8 @@ if [[ -n $tmp ]]; then
       tmp="\\$tmp"
     fi
   fi
-  $pre _wanted aliases expl alias compadd -UQ -- ${tmp%%[[:blank:]]##}
+  zstyle -T ":completion:${curcontext}:" add-space || suf=( -S '' )
+  $pre _wanted aliases expl alias compadd -UQ "$suf[@]" -- ${tmp%%[[:blank:]]##}
 elif (( $#pre )) && zstyle -t ":completion:${curcontext}:" complete; then
   $pre _aliases -s "$sel" -S ''
 else