From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18603 invoked from network); 29 Sep 1999 18:56:27 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 1999 18:56:27 -0000 Received: (qmail 15666 invoked by alias); 29 Sep 1999 18:56:21 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8101 Received: (qmail 15659 invoked from network); 29 Sep 1999 18:56:21 -0000 Date: Wed, 29 Sep 1999 19:56:20 +0100 From: Adam Spiers To: zsh workers mailing list Subject: Re: PATCH: missing _user@host Message-ID: <19990929195620.A15890@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list References: <19990926151723.F1246@thelonious.new.ox.ac.uk> <19990927142427.E10336@thelonious.new.ox.ac.uk> <19990927164319.A8641@caerdonn.eurocontrol.fr> <19990927175800.A769@caerdonn.eurocontrol.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: <19990927175800.A769@caerdonn.eurocontrol.fr> X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.12 i686 Ollivier Robert (roberto@eurocontrol.fr) wrote: > According to Ollivier Robert: > > Could you please use a filename with '@' in it ? It can screw up some > > Of course, one has to read "withOUT a '@'"... Sorry. I knew I was tempting fate with that `@' ... Index: Completion/User/_my_accounts =================================================================== RCS file: /usr/local/cvsroot/zsh/Completion/User/_my_accounts,v retrieving revision 1.3 diff -u -r1.3 _my_accounts --- Completion/User/_my_accounts 1999/09/28 10:32:21 1.3 +++ Completion/User/_my_accounts 1999/09/28 10:34:47 @@ -10,4 +10,4 @@ accounts_users_hosts=( $my_accounts ) fi -_user@host "$@" +_user_at_host "$@" Index: Completion/User/_other_accounts =================================================================== RCS file: /usr/local/cvsroot/zsh/Completion/User/_other_accounts,v retrieving revision 1.4 diff -u -r1.4 _other_accounts --- Completion/User/_other_accounts 1999/09/28 10:32:21 1.4 +++ Completion/User/_other_accounts 1999/09/28 10:34:52 @@ -10,4 +10,4 @@ accounts_users_hosts=( $other_accounts ) fi -_user@host "$@" +_user_at_host "$@" Index: Completion/User/_user@host =================================================================== RCS file: _user@host diff -N _user@host --- /tmp/cvsNB3LWJ Tue Sep 28 11:35:36 1999 +++ /dev/null Tue May 5 21:32:27 1998 @@ -1,15 +0,0 @@ -#autoload - -local expl nm="$compstate[nmatches]" - -if [[ -prefix 1 *@ ]]; then - local user=${PREFIX/@} - compset -P 1 '*@' - _description expl "hostnames for $user" - _combination accounts_users_hosts users="$user" hosts "$expl[@]" "$@" -else - _description expl "usernames" - _combination accounts_users_hosts users -S@ -q "$expl[@]" "$@" -fi - -[[ nm -ne compstate[nmatches] ]] Index: Completion/User/_user_at_host =================================================================== RCS file: _user_at_host diff -N _user_at_host --- /dev/null Tue May 5 21:32:27 1998 +++ _user_at_host Mon Sep 27 14:21:31 1999 @@ -0,0 +1,15 @@ +#autoload + +local expl nm="$compstate[nmatches]" + +if [[ -prefix 1 *@ ]]; then + local user=${PREFIX/@} + compset -P 1 '*@' + _description expl "hostnames for $user" + _combination accounts_users_hosts users="$user" hosts "$expl[@]" "$@" +else + _description expl "usernames" + _combination accounts_users_hosts users -S@ -q "$expl[@]" "$@" +fi + +[[ nm -ne compstate[nmatches] ]]