about summary refs log tree commit diff
path: root/Completion/User
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:24:09 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-04-15 18:24:09 +0000
commit6c1fb551ba0973c9a86e1ea479d553d66c6bf6b7 (patch)
treeec80a986c49f2da21eed83b7097f0f4e99f57e3f /Completion/User
parent640a840d2e94f0fc245ef8632050c37af23c6b94 (diff)
downloadzsh-6c1fb551ba0973c9a86e1ea479d553d66c6bf6b7.tar.gz
zsh-6c1fb551ba0973c9a86e1ea479d553d66c6bf6b7.tar.xz
zsh-6c1fb551ba0973c9a86e1ea479d553d66c6bf6b7.zip
zsh-3.1.5-pws-14 zsh-3.1.5-pws-14
Diffstat (limited to 'Completion/User')
-rw-r--r--Completion/User/_dd6
-rw-r--r--Completion/User/_find6
-rw-r--r--Completion/User/_mh4
-rw-r--r--Completion/User/_stty2
4 files changed, 9 insertions, 9 deletions
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 \