From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8712 invoked from network); 1 Nov 1999 08:02:09 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 1 Nov 1999 08:02:09 -0000 Received: (qmail 21209 invoked by alias); 1 Nov 1999 08:02:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8479 Received: (qmail 21202 invoked from network); 1 Nov 1999 08:02:04 -0000 Date: Mon, 1 Nov 1999 09:02:01 +0100 (MET) Message-Id: <199911010802.JAA28737@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk Subject: PATCH: small completion function fixes Two of them: - The suggested (commented-out) history code in `_first' wasn't fully up-to-date. - `_path_files' didn't work for files starting with a dot (GLOB_DOTS wasn't used). Bye Sven diff -u -r oldcompletion/Base/_first Completion/Base/_first --- oldcompletion/Base/_first Fri Oct 29 21:15:44 1999 +++ Completion/Base/_first Fri Oct 29 21:04:46 1999 @@ -47,15 +47,16 @@ # # The default is to search the last 100 lines. # max=10 # fi -# # We first search in the last ten lines, then in the last -# # twenty lines, and so on... +# # We first search in the last ten words, then in the last +# # twenty words, and so on... # while [[ i -le max ]]; do # if [[ -n "$compconfig[history_sort]" ]]; then # _description expl "history ($n)" # else # _description -V expl "history ($n)" # fi -# if compadd "$expl[@]" -Q - "${(@)historywords:#[\$'\"]*}"; then +# if compadd "$expl[@]" -Q - \ +# "${(@)${(@)historywords:#[\$'\"]*}[1,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 -u -r oldcompletion/Core/_path_files Completion/Core/_path_files --- oldcompletion/Core/_path_files Fri Oct 29 21:15:45 1999 +++ Completion/Core/_path_files Fri Oct 29 21:13:08 1999 @@ -10,7 +10,7 @@ typeset -U prepaths exppaths -setopt localoptions nullglob rcexpandparam +setopt localoptions nullglob rcexpandparam globdots unsetopt markdirs globsubst shwordsplit nounset local sopt='-' gopt='' opt @@ -210,7 +210,7 @@ # Get the matching files by globbing. if [[ "$tpre$tsuf" = */* ]]; then - tmp1=( ${^tmp1}*(-D/) ) + tmp1=( ${^tmp1}*(-/) ) else tmp1=( ${^tmp1}${^~pats} ) fi -- Sven Wischnowsky wischnow@informatik.hu-berlin.de