From 45f9a36216637075172d0bdf7ad8e18fad34c42e Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 13 Mar 2002 09:28:04 +0000 Subject: remove that -T option to compdef again and instead use comma-separated sub-contexts both for function and style lookup (16819) --- Completion/Zsh/Context/_redirect | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Completion/Zsh/Context/_redirect') 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 `:' and `', where -# `' 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} -- cgit 1.4.1