From 2f36613557a4d33b5706cd9335ff0a4c3b6f1c91 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 9 Sep 1999 14:10:01 +0000 Subject: zsh-workers/7747 --- Completion/Base/_first | 9 +++++++-- Completion/Commands/_history_complete_word | 6 +++++- Completion/User/_cvs | 2 +- Completion/User/_groups | 9 +++++++-- 4 files changed, 20 insertions(+), 6 deletions(-) (limited to 'Completion') diff --git a/Completion/Base/_first b/Completion/Base/_first index 694bb8c63..ba5ef6c24 100644 --- a/Completion/Base/_first +++ b/Completion/Base/_first @@ -35,7 +35,7 @@ # and hitting TAB. # # if [[ "$PREFIX" = *,, ]]; then -# local max i=1 +# local max i=1 expl # # PREFIX="$PREFIX[1,-2]" # # If a numeric prefix is given, we use it as the number of @@ -50,7 +50,12 @@ # # We first search in the last ten lines, then in the last # # twenty lines, and so on... # while [[ i -le max ]]; do -# if compgen -X "%Bhistory ($n):%b" -Q -H $(( i*10 )) ''; then +# if [[ -n "$compconfig[history_sort]" ]]; then +# _description expl "history ($n)" +# else +# _description -V expl "history ($n)" +# fi +# if compgen "$expl[@]" -Q -H $(( i*10 )) ''; then # # We have found at least one matching word, so we switch # # on menu-completion and make sure that no other # # completion function is called by setting _compskip. diff --git a/Completion/Commands/_history_complete_word b/Completion/Commands/_history_complete_word index b55966062..76cad470f 100644 --- a/Completion/Commands/_history_complete_word +++ b/Completion/Commands/_history_complete_word @@ -2,5 +2,9 @@ local expl -_description expl 'history word' +if [[ -n "$compconfig[history_sort]" ]]; then + _description expl 'history word' +else + _description -V expl 'history word' +fi compgen "$expl[@]" -Q -H 0 '' diff --git a/Completion/User/_cvs b/Completion/User/_cvs index 66adf80df..f1324cfb2 100644 --- a/Completion/User/_cvs +++ b/Completion/User/_cvs @@ -468,7 +468,7 @@ _cvs_extract_file_entries () { builtin functions _cvs_extract_modifiedfile_entries >&- || _cvs_extract_modifiedfile_entries () { - if [[ -n "$compconfig[_cvs_disable_stat]" ]] || + if [[ -n "$compconfig[cvs_disable_stat]" ]] || ! { zmodload -e stat || zmodload stat }; then _cvs_extract_file_entries return diff --git a/Completion/User/_groups b/Completion/User/_groups index 61f63596e..b867634c0 100644 --- a/Completion/User/_groups +++ b/Completion/User/_groups @@ -2,8 +2,13 @@ local expl -: ${(A)groups:=${${(s: :)$( /dev/null; then + : ${(A)groups:=${${(s: :)$(ypcat group.byname)}%%:*}} # If you use NIS + else + : ${(A)groups:=${${(s: :)$(