From 6c1fb551ba0973c9a86e1ea479d553d66c6bf6b7 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:24:09 +0000 Subject: zsh-3.1.5-pws-14 --- Completion/User/_dd | 6 +++--- Completion/User/_find | 6 +++--- Completion/User/_mh | 4 ++-- Completion/User/_stty | 2 +- 4 files changed, 9 insertions(+), 9 deletions(-) (limited to 'Completion/User') diff --git a/Completion/User/_dd b/Completion/User/_dd index 63ae40f50..6b07a382c 100644 --- a/Completion/User/_dd +++ b/Completion/User/_dd @@ -1,12 +1,12 @@ #defcomp dd -if [[ -iprefix conv= ]]; then +if compset -P 1 'conv\='; then # If there's a comma present, ignore up to the last one. The # test alone will have that effect. - [[ -string , ]] + compset -p '*,' compgen -S, -q \ -k '(ascii ebcdic ibm block unblock lcase ucase swab noerror sync)' -elif [[ -iprefix 'if=' || -iprefix 'of=' ]]; then +elif compset -P 1 '[io]f\='; then _files else compgen -S '=' -k '(if of ibs obs bs cbs skip files seek count conv)' diff --git a/Completion/User/_find b/Completion/User/_find index cb637fc26..13d1d797e 100644 --- a/Completion/User/_find +++ b/Completion/User/_find @@ -2,14 +2,14 @@ local prev="$words[CURRENT-1]" -if [[ -mbetween -(ok|exec) \\\; ]]; then +if compset -N '-(ok|exec)' '\;' then _normal -elif [[ -iprefix - ]]; then +elif compset -P 1 -; then compgen -s 'daystart {max,min,}depth follow noleaf version xdev \ {a,c,}newer {a,c,m}{min,time} empty false {fs,x,}type gid inum links \ {i,}{l,}name {no,}{user,group} path perm regex size true uid used \ exec {f,}print{f,0,} ok prune ls' -elif [[ -position 2 ]]; then +elif [[ CURRENT -eq 2 ]]; then local ret=1 compgen -g '. ..' && ret=0 diff --git a/Completion/User/_mh b/Completion/User/_mh index c6c018220..ab78468d8 100644 --- a/Completion/User/_mh +++ b/Completion/User/_mh @@ -13,7 +13,7 @@ local prev="$words[CURRENT-1]" # To be on the safe side, check this exists and if not, get it anyway. [[ -d $mymhdir ]] || mymhdir=$(mhpath +) -if [[ -iprefix - ]]; then +if compset -P 1 -; then # get list of options, which MH commands can generate themselves # awk is just too icky to use for this, sorry. send me one if # you come up with it. @@ -23,7 +23,7 @@ if [[ -iprefix - ]]; then print $n =~ s/^\[([a-z]+)\]// ? "$n\n$1$n\n" : "$n\n"; }') return -elif [[ -iprefix '+' || -iprefix '@' || "$prev" = -draftfolder ]]; then +elif compset -P 1 '[+@] || [ "$prev" = -draftfolder ]]; then # Complete folder names. local mhpath diff --git a/Completion/User/_stty b/Completion/User/_stty index d32d6bdff..73c860d54 100644 --- a/Completion/User/_stty +++ b/Completion/User/_stty @@ -5,7 +5,7 @@ if [[ "$words[CURRENT-1]" = \ then compadd -Q '^-' '^h' '^?' '^c' '^u' else - [[ -string '-' || -string '+' ]] + compset -P '[-+]' compadd rows columns intr quit erase kill eof eol \ eol2 start stop susp dsusp reprint discard werase lnext \ parenb parodd cs8 cstopb hupcl cread clocal parext \ -- cgit 1.4.1