summaryrefslogtreecommitdiffstats
path: root/Completion/User/_mh
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-08-19 11:18:05 +0000
commit9867c4091e71e6ed69889a9bfaee07275d2fa04e (patch)
tree37318116ff90f7b90df7cb9e894790d96be0849b /Completion/User/_mh
parentzsh-workers/7446 (diff)
downloadzsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.gz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.bz2
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.lz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.xz
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.tar.zst
zsh-9867c4091e71e6ed69889a9bfaee07275d2fa04e.zip
manual/7448
Diffstat (limited to 'Completion/User/_mh')
-rw-r--r--Completion/User/_mh27
1 files changed, 17 insertions, 10 deletions
diff --git a/Completion/User/_mh b/Completion/User/_mh
index f03e3d827..3a2e53794 100644
--- a/Completion/User/_mh
+++ b/Completion/User/_mh
@@ -8,7 +8,7 @@
local mymhdir=~/Mail
local mhlib=/usr/lib/mh
-local prev="$words[CURRENT-1]"
+local prev="$words[CURRENT-1]" expl
# To be on the safe side, check this exists and if not, get it anyway.
[[ -d $mymhdir ]] || mymhdir=$(mhpath +)
@@ -17,7 +17,8 @@ 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.
- compadd - $($words[1] -help | perl -ne 'if (/^\s*-\(?(\S+)/) {
+ _description expl option
+ compadd "$expl[@]" - $($words[1] -help | perl -ne 'if (/^\s*-\(?(\S+)/) {
$n = $1;
$n =~ s/\)//g;
print $n =~ s/^\[([a-z]+)\]// ? "$n\n$1$n\n" : "$n\n";
@@ -35,9 +36,11 @@ elif compset -P 1 '[+@]' || [[ "$prev" = -draftfolder ]]; then
fi
# painless, or what?
- _path_files -W mhpath -/
+ _description expl 'MH folder'
+ _path_files "$expl[@]" -W mhpath -/
elif [[ "$prev" = -(editor|(whatnow|rmm|show|more)proc) ]]; then
- compgen -c
+ _description expl command
+ compgen "$expl[@]" -c
elif [[ "$prev" = -file ]]; then
_files
elif [[ "$prev" = -(form|audit|filter) ]]; then
@@ -48,11 +51,14 @@ elif [[ "$prev" = -(form|audit|filter) ]]; then
[[ -d $mhlib ]] || { mhlib=$(mhparam mhlproc); mhlib=$mhlib:h; }
mhfpath=($mymhdir $mhlib)
- compgen -W mhfpath -g '*(.)'
+ _description expl 'MH template file'
+ compgen "$expl[@]" -W mhfpath -g '*(.)'
elif [[ "$prev" = -(no|)cc ]]; then
- compadd all to cc me
+ _description expl 'CC address'
+ compadd "$expl[@]" all to cc me
elif [[ "$prev" = -[rw]cache ]]; then
- compadd public private never ask
+ _description expl cache
+ compadd "$expl[@]" public private never ask
else
# Generate sequences.
local foldnam folddir f ret
@@ -69,10 +75,11 @@ else
# leaving foldnam empty works here
fi
- compadd $(mark $foldnam 2>/dev/null | awk -F: '{ print $1 }') &&
+ _description expl sequence
+ compadd "$expl[@]" $(mark $foldnam 2>/dev/null | awk -F: '{ print $1 }') &&
ret=0
- compadd reply next cur prev first last all unseen && ret=0
- compgen -W folddir -g '<->' && ret=0
+ compadd "$expl[@]" reply next cur prev first last all unseen && ret=0
+ compgen "$expl[@]" -W folddir -g '<->' && ret=0
return ret
fi