diff options
author | Tanaka Akira <akr@users.sourceforge.net> | 1999-07-12 17:02:40 +0000 |
---|---|---|
committer | Tanaka Akira <akr@users.sourceforge.net> | 1999-07-12 17:02:40 +0000 |
commit | 1f6786ef7ae24ff858f52c6d4ac2bc23d529c0c1 (patch) | |
tree | 608d6471d477e8d4d9eafa62f521be50c3248f6e /Completion/Core/_main_complete | |
parent | 7c670f1e6a0e154f0b1a2d4b6eed0e71c9404b56 (diff) | |
download | zsh-1f6786ef7ae24ff858f52c6d4ac2bc23d529c0c1.tar.gz zsh-1f6786ef7ae24ff858f52c6d4ac2bc23d529c0c1.tar.xz zsh-1f6786ef7ae24ff858f52c6d4ac2bc23d529c0c1.zip |
zsh-3.1.6-test-1 zsh-3.1.6-test-1
Diffstat (limited to 'Completion/Core/_main_complete')
-rw-r--r-- | Completion/Core/_main_complete | 30 |
1 files changed, 25 insertions, 5 deletions
diff --git a/Completion/Core/_main_complete b/Completion/Core/_main_complete index 62e60a1cc..af659e1d4 100644 --- a/Completion/Core/_main_complete +++ b/Completion/Core/_main_complete @@ -15,9 +15,13 @@ # any matches, correction is tried and if that doesn't yield # anything either, correcting completion is attempted. # -# These completer functions are only used when this function is called -# without arguments. If arguments are given, they should be names of -# completer functions which will then be called. +# These completer functions are only used when this function is called +# without arguments. If arguments are given, they should be names of +# completer functions which will then be called. +# +# last_prompt +# If this is set to `always' the cursor is moved up to the last prompt +# after printing a list even if a numeric argument was given. # If you want to complete only set or unset options for the unsetopt @@ -33,7 +37,7 @@ # state than the global one for which you are completing. -local comp +local comp ret=1 setopt localoptions nullglob rcexpandparam unsetopt markdirs globsubst shwordsplit nounset ksharrays @@ -54,5 +58,21 @@ fi # And now just call the completer functions defined. for comp; do - "$comp" && return + if "$comp"; then + ret=0 + break; + fi done + +[[ "$compconfig[last_prompt]" = always ]] && compstate[last_prompt]=yes + +_lastcomp=( "${(@kv)compstate}" ) +_lastcomp[completer]="$comp" +_lastcomp[prefix]="$PREFIX" +_lastcomp[suffix]="$SUFFIX" +_lastcomp[iprefix]="$IPREFIX" +_lastcomp[isuffix]="$ISUFFIX" +_lastcomp[qiprefix]="$QIPREFIX" +_lastcomp[qisuffix]="$QISUFFIX" + +return ret |