From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16995 invoked from network); 27 Sep 1999 13:25:03 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Sep 1999 13:25:03 -0000 Received: (qmail 3740 invoked by alias); 27 Sep 1999 13:24:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8065 Received: (qmail 3733 invoked from network); 27 Sep 1999 13:24:28 -0000 Date: Mon, 27 Sep 1999 14:24:27 +0100 From: Adam Spiers To: zsh workers mailing list Subject: PATCH: missing _user@host Message-ID: <19990927142427.E10336@thelonious.new.ox.ac.uk> Reply-To: Adam Spiers Mail-Followup-To: zsh workers mailing list References: <19990926151723.F1246@thelonious.new.ox.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0pre2i In-Reply-To: X-URL: http://www.new.ox.ac.uk/~adam/ X-OS: Linux 2.2.9 i686 Tanaka Akira (akr@jaist.ac.jp) wrote: > Hm. `_user@host' is forgotten. Not only forgotten, but somehow vanished without trace from my laptop. Sorry. Index: Completion/User/_my_accounts =================================================================== RCS file: /usr/local/cvsroot/zsh/Completion/User/_my_accounts,v retrieving revision 1.1 diff -u -r1.1 _my_accounts --- Completion/User/_my_accounts 1999/09/26 13:50:52 1.1 +++ Completion/User/_my_accounts 1999/09/27 13:09:58 @@ -11,4 +11,4 @@ accounts_users_hosts=( $my_accounts ) fi -_user@host +_user@host "$@" Index: Completion/User/_other_accounts =================================================================== RCS file: /usr/local/cvsroot/zsh/Completion/User/_other_accounts,v retrieving revision 1.2 diff -u -r1.2 _other_accounts --- Completion/User/_other_accounts 1999/09/27 02:07:10 1.2 +++ Completion/User/_other_accounts 1999/09/27 13:22:50 @@ -11,4 +11,4 @@ accounts_users_hosts=( $other_accounts ) fi -_user@host +_user@host "$@" Index: Completion/User/_user@host =================================================================== RCS file: _user@host diff -N _user@host --- /dev/null Tue May 5 21:32:27 1998 +++ _user@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] ]]