From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28225 invoked from network); 18 Apr 2000 21:53:53 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 18 Apr 2000 21:53:53 -0000 Received: (qmail 27856 invoked by alias); 18 Apr 2000 21:53:33 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3025 Received: (qmail 27819 invoked from network); 18 Apr 2000 21:53:28 -0000 Sender: opk Message-ID: <38FCCAFE.76E8162@u.genie.co.uk> Date: Tue, 18 Apr 2000 21:52:14 +0100 From: Oliver Kiddle X-Mailer: Mozilla 4.61 [en] (X11; I; Linux 2.2.13 i586) X-Accept-Language: en MIME-Version: 1.0 To: Jason Price CC: Zsh Users Subject: Re: 2 questions References: <20000418142432.A8998@oobleck.gatech.edu> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Jason Price wrote: > 1) I'm trying to do a simple string match in an if statement, akin to how > one is done in a case statement. Something like...: This is done with if statements normally. All you need is: if [[ "$var" = pattern ]]; then Make sure that you don't quote the pattern otherwise it won't work. > 2) I'm playing with dev-22, and trying to get things to work nice. > Currently, across all completion, should I hit , all matches are > printed onto the command line. Aka: > > ->ls p > > ->ls pc programs prompt > pc@ prompt > zstyle ':completion:*' completer _expand _complete _correct _approximate > zstyle ':completion:*' completions 1 > zstyle ':completion:*' glob 0 > zstyle ':completion:*' substitute 0 The problem here is that you use the _expand completer with completions 1 but glob 0 and substitute 0. The _expand completer is expanding all the completions on the command line. In general, I would only want to use completions 1 with a more specific context. Probably your best bet is to remove _expand from your list of completers but if you want it, then try reading the appropriate sections of Peter's Zsh Guide (try 'User-friendly users guide' from the zsh web pages if you don't know where to find it). Oliver Kiddle