summaryrefslogtreecommitdiffstats
path: root/Completion
diff options
context:
space:
mode:
authorPeter Stephenson <pws@users.sourceforge.net>2010-04-09 11:57:37 +0000
committerPeter Stephenson <pws@users.sourceforge.net>2010-04-09 11:57:37 +0000
commit27c1ca8628b03943768c8d9ebfdac1a46ec41374 (patch)
tree23ed3196871ea6f1027ac5e3d7b839a36dfeaa6c /Completion
parent27847: completion for uzbl. (diff)
downloadzsh-27c1ca8628b03943768c8d9ebfdac1a46ec41374.tar
zsh-27c1ca8628b03943768c8d9ebfdac1a46ec41374.tar.gz
zsh-27c1ca8628b03943768c8d9ebfdac1a46ec41374.tar.bz2
zsh-27c1ca8628b03943768c8d9ebfdac1a46ec41374.tar.lz
zsh-27c1ca8628b03943768c8d9ebfdac1a46ec41374.tar.xz
zsh-27c1ca8628b03943768c8d9ebfdac1a46ec41374.tar.zst
zsh-27c1ca8628b03943768c8d9ebfdac1a46ec41374.zip
Ben: 27589: improved -redirect
Diffstat (limited to 'Completion')
-rw-r--r--Completion/Zsh/Context/_redirect12
1 files changed, 7 insertions, 5 deletions
diff --git a/Completion/Zsh/Context/_redirect b/Completion/Zsh/Context/_redirect
index b33e785ee..e6da5d115 100644
--- a/Completion/Zsh/Context/_redirect
+++ b/Completion/Zsh/Context/_redirect
@@ -6,11 +6,13 @@ _set_command
strs=( -default- )
-if [[ -n "$_comp_command1" ]]; then
- strs=( "${_comp_command1}" "$strs[@]" )
- [[ -n "$_comp_command2" ]] &&
+if [[ "$CURRENT" != "1" ]]; then
+ strs=( "${_comp_command}" "$strs[@]" )
+ if [[ -n "$_comp_command1" ]]; then
+ strs=( "${_comp_command1}" "$strs[@]" )
+ [[ -n "$_comp_command2" ]] &&
strs=( "${_comp_command2}" "$strs[@]" )
+ fi
fi
-_dispatch -redirect-,${compstate[redirect]},${_comp_command} \
- -redirect-,{${compstate[redirect]},-default-},${^strs}
+_dispatch -redirect-,{${compstate[redirect]},-default-},${^strs}