From 904b939cbd81a542303da2c58288b95b153106f5 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 15 Apr 1999 18:17:36 +0000 Subject: zsh-3.1.5-pws-10 --- Completion/User/_a2ps | 22 ++++++++++++++ Completion/User/_compress | 3 ++ Completion/User/_configure | 12 ++++++++ Completion/User/_dd | 13 +++++++++ Completion/User/_dvi | 3 ++ Completion/User/_find | 21 ++++++++++++++ Completion/User/_gunzip | 3 ++ Completion/User/_gzip | 3 ++ Completion/User/_hosts | 3 ++ Completion/User/_make | 3 ++ Completion/User/_man | 11 +++++++ Completion/User/_mh | 70 +++++++++++++++++++++++++++++++++++++++++++++ Completion/User/_pdf | 3 ++ Completion/User/_ps | 3 ++ Completion/User/_rcs | 9 ++++++ Completion/User/_rlogin | 9 ++++++ Completion/User/_strip | 2 ++ Completion/User/_stty | 16 +++++++++++ Completion/User/_tar | 11 +++++++ Completion/User/_tex | 3 ++ Completion/User/_uncompress | 3 ++ Completion/User/_x_options | 5 ++++ Completion/User/_xfig | 3 ++ 23 files changed, 234 insertions(+) create mode 100644 Completion/User/_a2ps create mode 100644 Completion/User/_compress create mode 100644 Completion/User/_configure create mode 100644 Completion/User/_dd create mode 100644 Completion/User/_dvi create mode 100644 Completion/User/_find create mode 100644 Completion/User/_gunzip create mode 100644 Completion/User/_gzip create mode 100644 Completion/User/_hosts create mode 100644 Completion/User/_make create mode 100644 Completion/User/_man create mode 100644 Completion/User/_mh create mode 100644 Completion/User/_pdf create mode 100644 Completion/User/_ps create mode 100644 Completion/User/_rcs create mode 100644 Completion/User/_rlogin create mode 100644 Completion/User/_strip create mode 100644 Completion/User/_stty create mode 100644 Completion/User/_tar create mode 100644 Completion/User/_tex create mode 100644 Completion/User/_uncompress create mode 100644 Completion/User/_x_options create mode 100644 Completion/User/_xfig (limited to 'Completion/User') diff --git a/Completion/User/_a2ps b/Completion/User/_a2ps new file mode 100644 index 000000000..9aa9d3d99 --- /dev/null +++ b/Completion/User/_a2ps @@ -0,0 +1,22 @@ +#defcomp a2ps + +if [[ -prefix -- ]]; then + _comp_parts '(--borders --compact --truncate-lines --interpret + --print-anyway --delegate)' '=' '(yes no)' + _comp_parts '(--major)' '=' '(rows columns)' + _comp_parts '(--end-of-line)' '=' '(r n nr rn any)' + + complist -S= -k '(--medium --columns --rows --line-numbers + --font-size --lines-per-page --chars-per-line + --tabsize --non-printable-format --encoding + --title --stdin --prologue --highlight-level + --strip-level --output --version-control --suffix + --printer --copies --sides --page-prefeed + --no-page-prefeed)' + complist -qS= -k '(--margin --header --underlay --left-title + --right-title --left-footer --footer --right-footer + --pages --pretty-print)' + complist -k '(--landscape --portrait --catman --no-header)' +else + _files -F fignore -g "*~*.ps" +fi diff --git a/Completion/User/_compress b/Completion/User/_compress new file mode 100644 index 000000000..860aeb5b0 --- /dev/null +++ b/Completion/User/_compress @@ -0,0 +1,3 @@ +#defcomp compress + +_files -g '*~*.Z' diff --git a/Completion/User/_configure b/Completion/User/_configure new file mode 100644 index 000000000..de8d5fba5 --- /dev/null +++ b/Completion/User/_configure @@ -0,0 +1,12 @@ +#defcomp configure + +if [[ $PREFIX = *=* ]]; then + # Complete filenames after e.g. --prefix= + IPREFIX=${PREFIX%%=*}= + PREFIX=${PREFIX#*=} + complist -f +else + # Generate a list of options from configure --help + complist -s '$($COMMAND --help | + sed -n -e '\''s/^ *\(--[-a-z0-9]*\)[ =,].*$/\1/p'\'')' +fi diff --git a/Completion/User/_dd b/Completion/User/_dd new file mode 100644 index 000000000..2458541ea --- /dev/null +++ b/Completion/User/_dd @@ -0,0 +1,13 @@ +#defcomp dd + +if [[ -iprefix conv= ]]; then + # If there's a comma present, ignore up to the last one. The + # test alone will have that effect. + [[ -string , ]] + complist -S, -q \ + -k '(ascii ebcdic ibm block unblock lcase ucase swab noerror sync)' +elif [[ -iprefix 'if=' || -iprefix 'of=' ]]; then + _files +else + complist -S '=' -k '(if of ibs obs bs cbs skip files seek count conv)' +fi diff --git a/Completion/User/_dvi b/Completion/User/_dvi new file mode 100644 index 000000000..bb2fc293e --- /dev/null +++ b/Completion/User/_dvi @@ -0,0 +1,3 @@ +#defcomp xdvi dvips dvibook dviconcat dvicopy dvidvi dviselect dvitodvi dvitype + +_files -g '*.(dvi|DVI)' diff --git a/Completion/User/_find b/Completion/User/_find new file mode 100644 index 000000000..ca4f79908 --- /dev/null +++ b/Completion/User/_find @@ -0,0 +1,21 @@ +#defcomp find + +if [[ -mbetween -(ok|exec) \\\; ]]; then + _normal "$@" +elif [[ -iprefix - ]]; then + complist -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 1 ]]; then + complist -g '. ..' + _files -g '(-/)' +elif [[ -mcurrent -1 -((a|c|)newer|fprint(|0|f)) ]]; then + _files +elif [[ -current -1 -fstype ]]; then + complist -k '(ufs 4.2 4.3 nfs tmp mfs S51K S52K)' +elif [[ -current -1 -group ]]; then + complist -k groups +elif [[ -current -1 -user ]]; then + complist -u +fi diff --git a/Completion/User/_gunzip b/Completion/User/_gunzip new file mode 100644 index 000000000..35a27e774 --- /dev/null +++ b/Completion/User/_gunzip @@ -0,0 +1,3 @@ +#defcomp gunzip zcat + +_files -g '*.[gG][z]' diff --git a/Completion/User/_gzip b/Completion/User/_gzip new file mode 100644 index 000000000..3cda1e4ed --- /dev/null +++ b/Completion/User/_gzip @@ -0,0 +1,3 @@ +#defcomp gzip + +_files -g '*~*.[gG][zZ]' diff --git a/Completion/User/_hosts b/Completion/User/_hosts new file mode 100644 index 000000000..3acc327ac --- /dev/null +++ b/Completion/User/_hosts @@ -0,0 +1,3 @@ +#defcomp ftp ncftp ping rwho rup xping traceroute nslookup + +complist -k hosts diff --git a/Completion/User/_make b/Completion/User/_make new file mode 100644 index 000000000..d576b0308 --- /dev/null +++ b/Completion/User/_make @@ -0,0 +1,3 @@ +#defcomp make gmake pmake + +complist -s "\$(awk '/^[a-zA-Z0-9][^/ ]+:/ {print \$1}' FS=: [mM]akefile)" diff --git a/Completion/User/_man b/Completion/User/_man new file mode 100644 index 000000000..8204fba0b --- /dev/null +++ b/Completion/User/_man @@ -0,0 +1,11 @@ +#defcomp man +setopt localoptions rcexpandparam + +local rep +if [[ $2 = (<->*|ln) ]]; then + rep=( $manpath/(man|cat)$2/$PREFIX*$SUFFIX.<->*(N:t:r) ) +else + rep=( $manpath/(man|cat)*/$PREFIX*$SUFFIX.<->*(N:t:r) ) +fi + +(( $#rep )) && compadd -m $rep diff --git a/Completion/User/_mh b/Completion/User/_mh new file mode 100644 index 000000000..67ce49fd2 --- /dev/null +++ b/Completion/User/_mh @@ -0,0 +1,70 @@ +#defcomp folder comp inc mark refile repl scan show next prev rmm pick whom mhn mhpath mhpatch + +# Completion for all possible MH commands. +# Alter the following two to your own mh directory and the directory +# where standard mh library files live. (It works anyway, but this +# will save a little time.) +local mymhdir=~/Mail +local mhlib=/usr/lib/mh + +# To be on the safe side, check this exists and if not, get it anyway. +[[ -d $mymhdir ]] || mymhdir=$(mhpath +) + +if [[ -iprefix - ]]; 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. + compadd -m $($COMMAND -help | perl -ne 'if (/^\s*-\(?(\S+)/) { + $n = $1; + $n =~ s/\)//g; + print $n =~ s/^\[([a-z]+)\]// ? "$n\n$1$n\n" : "$n\n"; + }') + return +elif [[ -iprefix '+' || -iprefix '@' || -current -1 -draftfolder ]]; then + # Complete folder names. + local mhpath + if [[ $IPREFIX != '@' ]]; then + [[ $IPREFIX = '+' ]] || IPREFIX=+ + mhpath=$mymhdir + else + mhpath=$(mhpath) + fi + + # painless, or what? + complist -W mhpath -/ +elif [[ -mcurrent -1 -(editor|(whatnow|rmm|show|more)proc) ]]; then + complist -c +elif [[ -current -1 -file ]]; then + complist -f +elif [[ -mcurrent -1 -(form|audit|filter) ]]; then + # Need some MH template file, which may be in our own MH directory + # or with the standard library. + local mhfpath + # This is the only place we need mhlib, so leave the test till here. + [[ -d $mhlib ]] || { mhlib=$(mhparam mhlproc); mhlib=$mhlib:h; } + mhfpath=($mymhdir $mhlib) + + complist -W mhfpath -g '*(.)' +elif [[ -mcurrent -1 -(no|)cc ]]; then + compadd -m all to cc me +elif [[ -mcurrent -1 -[rw]cache ]]; then + compadd -m public private never ask +else + # Generate sequences. + local foldnam folddir f + for f in $argv; do + [[ $f = [@+]* ]] && foldnam=$f + done + if [[ $foldnam = '+'* ]]; then + folddir=$mymhdir/${foldnam#+} + elif [[ $foldnam = '@'* ]]; then + folddir=$(mhpath)/${foldnam#@} + else + folddir=$(mhpath) + # leaving foldnam empty works here + fi + + complist -s '$(mark $foldnam | awk -F: '\''{ print $1 }'\'')' + compadd -m reply next cur prev first last all unseen + complist -W folddir -g '<->' +fi diff --git a/Completion/User/_pdf b/Completion/User/_pdf new file mode 100644 index 000000000..7d7756c3e --- /dev/null +++ b/Completion/User/_pdf @@ -0,0 +1,3 @@ +function acroread + +_files -g '*.(pdf|PDF)' diff --git a/Completion/User/_ps b/Completion/User/_ps new file mode 100644 index 000000000..6bc0643b2 --- /dev/null +++ b/Completion/User/_ps @@ -0,0 +1,3 @@ +#defcomp gs ghostview gview psnup psselect pswrap pstops pstruct lpr + +_files -g '*([pP][sS]|eps)' diff --git a/Completion/User/_rcs b/Completion/User/_rcs new file mode 100644 index 000000000..537db6278 --- /dev/null +++ b/Completion/User/_rcs @@ -0,0 +1,9 @@ +#defcomp co ci rcs + +[[ $COMMAND = ci || $COMMAND = rcs ]] && _files + +if [[ $NMATCHES -eq 0 && -d RCS && $COMMAND != ci ]]; then + local rep + rep=(RCS/$PREFIX*$SUFFIX,v(:t:s/\,v//)) + (( $#rep )) && compadd -m $rep +fi diff --git a/Completion/User/_rlogin b/Completion/User/_rlogin new file mode 100644 index 000000000..e36554f23 --- /dev/null +++ b/Completion/User/_rlogin @@ -0,0 +1,9 @@ +#defcomp rlogin rsh ssh + +if [[ -position 1 ]]; then + complist -k hosts +elif [[ -position 2 ]]; then + complist -k '(-l)' +else + complist -u +fi diff --git a/Completion/User/_strip b/Completion/User/_strip new file mode 100644 index 000000000..6962ac455 --- /dev/null +++ b/Completion/User/_strip @@ -0,0 +1,2 @@ +#defcomp strip +_files -g '*(*)' diff --git a/Completion/User/_stty b/Completion/User/_stty new file mode 100644 index 000000000..6b54b5007 --- /dev/null +++ b/Completion/User/_stty @@ -0,0 +1,16 @@ +#defcomp stty + +if [[ -mcurrent -1 \ + (*erase|discard|status|dsusp|intr|kill|lnext|quit|reprint|start|s*p) ]] +then + compadd -m -Q '^-' '^h' '^?' '^c' '^u' +else + [[ -string '-' || -string '+' ]] + compadd -m 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 \ + ignbrk brkint ignpar parmrk inpck istrip inlcr igncr icrnl iuclc \ + ixon ixany ixoff imaxbel isig icanon xcase echo echoe echok \ + echonl noflsh tostop echoctl echoprt echoke flusho pending iexten \ + opost olcuc onlcr ocrnl onocr onlret ofill ofdel +fi diff --git a/Completion/User/_tar b/Completion/User/_tar new file mode 100644 index 000000000..91767e44d --- /dev/null +++ b/Completion/User/_tar @@ -0,0 +1,11 @@ +#defcomp tar + +local nm=$NMATCHES tf="$2" + +if [[ ( -mword 1 *t*f* || -mword 1 *x*f* ) && -position 3 100000 ]]; then + complist -k "( $(tar tf $tf) )" +elif [[ -mword 1 *c*f* && -position 3 100000 ]]; then + _files +elif [[ -mcurrent -1 *f* && -position 2 ]]; then + _files -g '*.(tar|TAR)' +fi diff --git a/Completion/User/_tex b/Completion/User/_tex new file mode 100644 index 000000000..1f645e2a2 --- /dev/null +++ b/Completion/User/_tex @@ -0,0 +1,3 @@ +#defcomp tex latex slitex + +_files -g '*.(tex|TEX|texinfo|texi)' diff --git a/Completion/User/_uncompress b/Completion/User/_uncompress new file mode 100644 index 000000000..e25805d50 --- /dev/null +++ b/Completion/User/_uncompress @@ -0,0 +1,3 @@ +#defcomp uncompress zmore + +_files -g '*.Z' diff --git a/Completion/User/_x_options b/Completion/User/_x_options new file mode 100644 index 000000000..cc469286d --- /dev/null +++ b/Completion/User/_x_options @@ -0,0 +1,5 @@ +#defpatcomp */X11/* + +# A simple pattern completion, just as an example. + +complist -J options -k '(-display -name -xrm)' diff --git a/Completion/User/_xfig b/Completion/User/_xfig new file mode 100644 index 000000000..fcd2bba9f --- /dev/null +++ b/Completion/User/_xfig @@ -0,0 +1,3 @@ +#defcomp xfig + +_files -g '*.fig' -- cgit 1.4.1