* add alias from ~/.muttrc to completion
@ 2002-03-04 23:26 Bruno Bonfils
0 siblings, 0 replies; only message in thread
From: Bruno Bonfils @ 2002-03-04 23:26 UTC (permalink / raw)
To: zsh-workers
[-- Attachment #1.1: Type: text/plain, Size: 237 bytes --]
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
[-- Attachment #1.2: _mutt.diff --]
[-- Type: text/plain, Size: 801 bytes --]
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 #2: Type: application/pgp-signature, Size: 249 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2002-03-04 23:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-04 23:26 add alias from ~/.muttrc to completion Bruno Bonfils
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).