Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

add alias from ~/.muttrc to completion



hi,

all in the title !

comments are welcome (may be there is a more simple solution for
extract alias from muttrc)

thx

-- 
Bruno Bonfils
Admin Sys GNU/Linux

 http://speka.net
 http://hash-group.net
 http://zshfr.org
7c7
<     '::recipient:->userhost' \
---
>     '::recipient:->userhostalias' \
28c28
< if [[ "$state" = userhost ]]; then
---
> if [[ "$state" = userhostalias ]]; then
33a34
>     
35c36,53
<     _users "$expl[@]" -q -S "$suf" && return 0
---
>     _users "$expl[@]" -q -S "$suf"
> 
>     # added by asyd (20020304)
>     if [ -r ~/.muttrc ]; then
> 
>        # use cache
>        if ( [[ ${+_list_alias} -eq 0 ]] || _cache_invalid mutt_alias ) &&
>           ! _retrieve_cache mutt_alias; then
>        
>           _list_alias=(${(o)${${(M)${(f)"$(< ~/.muttrc)"}##alias*}/alias /}%% *})
>        
>           _store_cache mutt_alias _list_alias
>        fi
>        
>        _wanted alias expl 'alias name' compadd -q -S, $_list_alias 
>     fi
>     return 0
>     

Attachment: pgppT50xOE2Kx.pgp
Description: PGP signature



Messages sorted by: Reverse Date, Date, Thread, Author