mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-11-19 13:33:52 +01:00
use mhpath and mhparams commands instead of guessing directories (12356)
This commit is contained in:
parent
0e8c318b8e
commit
b758c10726
@ -1,3 +1,8 @@
|
||||
2000-07-24 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 12356: Completion/User/_mh: use mhpath and mhparam instead of
|
||||
guessing the directory
|
||||
|
||||
2000-07-24 Sven Wischnowsky <wischnow@zsh.org>
|
||||
|
||||
* 12354: Completion/Core/_multi_parts: optimisations for
|
||||
|
@ -1,11 +1,8 @@
|
||||
#compdef folder folders comp inc mark refile repl scan show next prev rmm pick whom mhn mhpath
|
||||
|
||||
# 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 mymhdir=${$(mhpath + 2>/dev/null):-~/Mail}
|
||||
local mhlib=/usr/lib/mh
|
||||
|
||||
local prev="$words[CURRENT-1]" expl
|
||||
@ -45,7 +42,7 @@ elif [[ "$prev" = -(form|audit|filter) ]]; then
|
||||
# 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; }
|
||||
mhlib=${${$(mhparam mhlproc 2>/dev/null):h}:-/usr/lib/mh}
|
||||
mhfpath=($mymhdir $mhlib)
|
||||
|
||||
_wanted files expl 'MH template file' _files -W mhfpath -g '*(.)'
|
||||
|
Loading…
Reference in New Issue
Block a user