From: Bruno Bonfils <asyd@debian-fr.org>
To: zsh-workers@sunsite.dk
Subject: add alias from ~/.muttrc to completion
Date: Tue, 5 Mar 2002 00:26:01 +0100 [thread overview]
Message-ID: <20020304232601.GA6095@syd-barrett.hash-group.net> (raw)
[-- 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 --]
reply other threads:[~2002-03-04 23:27 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020304232601.GA6095@syd-barrett.hash-group.net \
--to=asyd@debian-fr.org \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).