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/Base/Utility/_set_command | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'Completion/Base/Utility') diff --git a/Completion/Base/Utility/_set_command b/Completion/Base/Utility/_set_command index daf532686..6b4910889 100644 --- a/Completion/Base/Utility/_set_command +++ b/Completion/Base/Utility/_set_command @@ -1,7 +1,7 @@ #autoload -# This sets the parameters _comp_command1 and _comp_command2 in the -# calling function. +# This sets the parameters _comp_command1, _comp_command2 and _comp_command +# in the calling function. local command @@ -11,21 +11,21 @@ command="$words[1]" if (( $+builtins[$command] + $+functions[$command] )); then _comp_command1="$command" - curcontext="${curcontext%:*:*}:${_comp_command1}:" + _comp_command="$_comp_command1" elif [[ "$command[1]" = '=' ]]; then eval _comp_command2\=$command _comp_command1="$command[2,-1]" - curcontext="${curcontext%:*:*}:${_comp_command2}:" + _comp_command="$_comp_command2" elif [[ "$command" = ..#/* ]]; then _comp_command1="${PWD}/$command" _comp_command2="${command:t}" - curcontext="${curcontext%:*:*}:${_comp_command2}:" + _comp_command="$_comp_command2" elif [[ "$command" = */* ]]; then _comp_command1="$command" _comp_command2="${command:t}" - curcontext="${curcontext%:*:*}:${_comp_command2}:" + _comp_command="$_comp_command2" else _comp_command1="$command" _comp_command2="$commands[$command]" - curcontext="${curcontext%:*:*}:${_comp_command1}:" + _comp_command="$_comp_command1" fi -- cgit 1.4.1