about summary refs log tree commit diff
path: root/Completion/Zsh/Context/_redirect
diff options
context:
space:
mode:
authorSven Wischnowsky <wischnow@users.sourceforge.net>2002-03-13 09:28:04 +0000
committerSven Wischnowsky <wischnow@users.sourceforge.net>2002-03-13 09:28:04 +0000
commit45f9a36216637075172d0bdf7ad8e18fad34c42e (patch)
tree8505f11011505b00e8cef1142b11c2b2e94e17e9 /Completion/Zsh/Context/_redirect
parent799b34d817a77244e9e371f6d5f1b01aa171214c (diff)
downloadzsh-45f9a36216637075172d0bdf7ad8e18fad34c42e.tar.gz
zsh-45f9a36216637075172d0bdf7ad8e18fad34c42e.tar.xz
zsh-45f9a36216637075172d0bdf7ad8e18fad34c42e.zip
remove that -T option to compdef again and instead use comma-separated sub-contexts both for function and style lookup (16819)
Diffstat (limited to 'Completion/Zsh/Context/_redirect')
-rw-r--r--Completion/Zsh/Context/_redirect15
1 files changed, 7 insertions, 8 deletions
diff --git a/Completion/Zsh/Context/_redirect b/Completion/Zsh/Context/_redirect
index 5e454014b..b33e785ee 100644
--- a/Completion/Zsh/Context/_redirect
+++ b/Completion/Zsh/Context/_redirect
@@ -1,17 +1,16 @@
 #compdef -redirect-
 
-# This searches for `<command-name>:<redir-op>' and `<redir-op>', where
-# `<redir-op>' is something like `<' or `2>'.
-
-local strs _comp_command1 _comp_command2
+local strs _comp_command1 _comp_command2 _comp_command
 
 _set_command
 
-strs=( "$compstate[redirect]" )
+strs=( -default- )
 
 if [[ -n "$_comp_command1" ]]; then
-  strs=( "${_comp_command1}:$strs[-1]" "$strs[@]" )
-  [[ -n "$_comp_command2" ]] && strs=( "${_comp_command2}:$strs[1]" "$strs[@]" )
+  strs=( "${_comp_command1}" "$strs[@]" )
+  [[ -n "$_comp_command2" ]] &&
+      strs=( "${_comp_command2}" "$strs[@]" )
 fi
 
-_dispatch -d redirs "$strs[@]"
+_dispatch -redirect-,${compstate[redirect]},${_comp_command} \
+          -redirect-,{${compstate[redirect]},-default-},${^strs}