From c9e0760f68994a0222f9b17d2c3f4ea0da337b98 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Fri, 24 Mar 2000 00:53:26 +0000 Subject: manual/10204 --- Completion/Core/_tags | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'Completion/Core/_tags') diff --git a/Completion/Core/_tags b/Completion/Core/_tags index b74e70264..2dfa56f9d 100644 --- a/Completion/Core/_tags +++ b/Completion/Core/_tags @@ -1,5 +1,17 @@ #autoload +local prev + +# A `--' as the first argument says that we should tell comptags to use +# the preceding function nesting level. This is only documented here because +# if everythings goes well, users won't have to worry about it and should +# not mess with it. + +if [[ "$1" = -- ]]; then + prev=- + shift +fi + if (( $# )); then # We have arguments: the tags supported in this context. @@ -33,7 +45,7 @@ if (( $# )); then # Set and remember offered tags. - comptags -i "$curcontext" "$@" + comptags "-i$prev" "$curcontext" "$@" # Sort the tags. @@ -80,11 +92,11 @@ if (( $# )); then # Return non-zero if at least one set of tags should be used. - comptags -T + comptags "-T$prev" return fi # The other mode: switch to the next set of tags. -comptags -N +comptags "-N$prev" -- cgit 1.4.1