From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29054 invoked from network); 21 Jul 1999 15:43:42 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 21 Jul 1999 15:43:42 -0000 Received: (qmail 14946 invoked by alias); 21 Jul 1999 15:43:30 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7243 Received: (qmail 14939 invoked from network); 21 Jul 1999 15:43:29 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: CVS completer (Re: PATCH: Re: Completion/User functions again) References: <199907211127.NAA02895@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 22 Jul 1999 00:43:27 +0900 In-Reply-To: Tanaka Akira's message of "21 Jul 1999 21:35:02 +0900" Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) In article , Tanaka Akira writes: > I think it should be replaced by 'compadd "$PREFIX"'. The patch is follows. Also, I modified the completer for "cvs import" not to generate an error without CVSROOT. --- Completion/User/_cvs- Wed Jul 21 23:58:01 1999 +++ Completion/User/_cvs Thu Jul 22 00:08:46 1999 @@ -1,5 +1,7 @@ #compdef cvs +setopt localoptions extendedglob + typeset -A commands commands=(add "ad new" admin "adm rcs" annotate ann checkout "co get" commit "ci com" diff "di dif" @@ -55,7 +57,12 @@ ;; import|im|imp) # "+Qqdb:m:I:k:W:" _complete_opts Q '' q '' d '' b: '' m: "$complete_m" I: '' k: "$complete_k" W: '' || case $[CURRENT-com] in - 1) compgen -X "Enter repository name" -W $CVSROOT -g '*~*CVSROOT(/)' -s '';; + 1) if [[ "${+CVSROOT}" == 1 && "$CVSROOT" != :* ]]; then + compgen -X "Enter repository name" -W "$CVSROOT" -g '*~*CVSROOT(/)' -s '' + else + compadd -UX "Enter repository name" -n '' && eval "$showhint" + fi + ;; 2) compadd -UX "Enter vendor tag name" -n '' && eval "$showhint";; 3) compadd -UX "Enter release tag name" -n '' && eval "$showhint";; *) compadd -UX "No futher arguments used" -n '' && eval "$showhint";; --- Completion/Base/_complete_opts- Thu Jul 22 00:32:33 1999 +++ Completion/Base/_complete_opts Thu Jul 22 00:33:03 1999 @@ -18,7 +18,7 @@ case "${#no_arg}-${#with_arg}" in 0-0) if [[ x$PREFIX = x-* ]]; then - compgen -k '()' # What does this accomplish? + compadd - "$PREFIX" else done='' fi -- Tanaka Akira