Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
2 questions
- X-seq: zsh-users 3024
- From: Jason Price <jprice@xxxxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxx
- Subject: 2 questions
- Date: Tue, 18 Apr 2000 14:24:32 -0400
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
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@xxxxxxxxxx
More to the point, one answer: Theta Xi, Beta Alpha, 449
"Yes, Lord."
Messages sorted by:
Reverse Date,
Date,
Thread,
Author