#
# Extract nmh message names and numbers for completion. Use of the
# correct folder, if it is not the current one, requires that it
-# should be the previous command line argument. If the previous
-# argument is `-draftmessage', a hard wired draft folder name is used.
+# should be the previous command line argument.
#
mhfseq() {
local folder foldpath words pos nums
# First try the previous word.
if [[ $words[$pos-1] = [@+]* ]]; then
folder=$words[$pos-1]
- # Next look and see if we're looking for a draftmessage
- elif [[ $words[$pos-1] = -draftmessage ]]; then
- # EDIT ME: shortcut -- hard-wire draftfolder here
- # Should really look for a +draftfolder argument.
- folder=+drafts
fi
# Else use the current folder ($folder empty)
's[-]' -k "(sequence all noall recurse norecurse showzero noshowzero \
alpha noalpha fast nofast help)" -- flist flists
-compctl -K mhfseq -x 's[+][@],c[-1,-draftfolder] s[+][@]' \
- -K mhcomp -S / -q - 'c[-1,-draftmessage]' -K mhfseq - \
+compctl -K mhfseq -x 's[+][@],c[-1] s[+][@]' \
+ -K mhcomp -S / -q - 'c[-1]' -K mhfseq - \
'C[-1,-(editor|whatnowproc)]' -c - \
- 's[-]' -k "(draftfolder draftmessage nodraftfolder editor noedit \
+ 's[-]' -k "(editor noedit \
file form use nouse whatnowproc nowhatnowproc help)" - \
'c[-1,-form]' -K mhfile -- comp
compctl -K mhfseq -x 's[+][@]' \
- -K mhcomp -S / -q - 'c[-1,-draftmessage]' -K mhfseq -\
- 's[-]' -k "(annotate noannotate cc nocc draftfolder nodraftfolder \
- draftmessage editor noedit fcc filter form group nogroup inplace noinplace
+ -K mhcomp -S / -q - 'c[-1]' -K mhfseq -\
+ 's[-]' -k "(annotate noannotate cc nocc \
+ editor noedit fcc filter form group nogroup inplace noinplace
query noquery width whatnowproc nowhatnowproc help)" - 'c[-1,(cc|nocc)]' \
-k "(all to cc me)" - 'C[-1,-(filter|form)]' -K mhfile - \
'C[-1,-(editor|whatnowproc)]' -c -- repl
public nopublic search sequence subject to zero nozero not or and \
lbrace rbrace)" -- pick
-compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' \
- -k "(alias check draft draftfolder draftmessage help nocheck \
- nodraftfolder)" -- whom
-
-compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' \
- -k "(file part type list headers noheaders realsize norealsize nolist \
- show serialonly noserialonly form pause nopause noshow store auto noauto \
- nostore cache nocache rcache wcache check nocheck ebcdicsafe noebcdicsafe \
- rfc934mode norfc934mode verbose noverbose help)" - \
- 'c[-1,-file]' -f - 'c[-1,-form]' -K mhfile - \
- 'C[-1,-[rw]cache]' -k '(public private never ask)' -- mhn
-
compctl -K mhfseq -x 's[+][@]' -K mhcomp -S / -q - 's[-]' -k '(help)' -- mhpath
-