From: Oliver Kiddle <opk@u.genie.co.uk>
To: Jason Price <jprice@cyberbuzz.gatech.edu>
Cc: Zsh Users <zsh-users@sunsite.auc.dk>
Subject: Re: 2 questions
Date: Tue, 18 Apr 2000 21:52:14 +0100 [thread overview]
Message-ID: <38FCCAFE.76E8162@u.genie.co.uk> (raw)
In-Reply-To: <20000418142432.A8998@oobleck.gatech.edu>
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 <tab>, all matches are
> printed onto the command line. Aka:
>
> ->ls p<tab>
>
> ->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
next prev parent reply other threads:[~2000-04-18 21:53 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-18 18:24 Jason Price
2000-04-18 20:52 ` Oliver Kiddle [this message]
-- strict thread matches above, loose matches on Subject: below --
2000-04-19 14:25 Sven Wischnowsky
1995-10-31 16:13 Jose Unpingco
1995-11-01 8:46 ` P.Stephenson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=38FCCAFE.76E8162@u.genie.co.uk \
--to=opk@u.genie.co.uk \
--cc=jprice@cyberbuzz.gatech.edu \
--cc=zsh-users@sunsite.auc.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).