From: Jason Price <jprice@cyberbuzz.gatech.edu>
To: zsh-users@sunsite.auc.dk
Subject: 2 questions
Date: Tue, 18 Apr 2000 14:24:32 -0400 [thread overview]
Message-ID: <20000418142432.A8998@oobleck.gatech.edu> (raw)
I'm trying to get a couple of things to work. Unfortunatly, I'm pretty
sure both are simple... :(. I just can't figure it out.
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...:
case $var in
patern1* ) ;;
patern2* ) ;;
esac
if [[ "$var" in "patern1*" ]]; then
fi
I could do this in a case statement, but when you just have one if
condition...
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
bin/ newcomplete.ps pc@ prompt
file nsmail/ programs/
->ls p<tab>
->ls pc programs prompt
pc@ prompt
programs:
bind/ gtar/ netscape/ vim/
gnu/ ncftp/ ssh/ zsh/
->ta<tab>
->ta tabs tail talk talkback tapes tapetool tar targs
->cd programs/g<tab>
->cd programs/gnu programs/gtar/
This is not exactly what I want. I'd rather have menu complete when it's
non unique, defaulting to the first option, and allowing tab'ing or
arrowing through the list. New completion setup is as follows:
# The following lines were added by compinstall
autoload -U compinit
compinit
[[ -z $fpath[(r)$_compdir] ]] && fpath=($fpath $_1ompdir)
zstyle ':completion:*' completer _expand _complete _correct _approximate
zstyle ':completion:*' completions 1
zstyle ':completion:*' glob 0
zstyle ':completion:*' ignore-parents parent pwd
zstyle ':completion:*' matcher-list '' 'r:|[._-]=* r:|=*' 'm:{a-zA-Z}={A-Za-z}'
zstyle ':completion:*' max-errors 1
zstyle ':completion:*' menu select=200
zstyle ':completion:*' squeeze-slashes true
zstyle ':completion:*' substitute 0
zstyle ':completion:*' use-compctl false
zstyle ':completion:*' verbose false
# End of lines added by compinstall
Any pointers would be greatly appreciated. If you need any more info,
please let me know.
Jason
--
Faith is not a matter of questions. Jason Price
Faith is a matter of answers. jprice@gatech.edu
More to the point, one answer: Theta Xi, Beta Alpha, 449
"Yes, Lord."
next reply other threads:[~2000-04-18 18:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-04-18 18:24 Jason Price [this message]
2000-04-18 20:52 ` Oliver Kiddle
-- 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=20000418142432.A8998@oobleck.gatech.edu \
--to=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).