Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: zsh Newbie wants to complete mutt email addresses or aliases
- X-seq: zsh-users 4905
- From: "Kingsley G. Morse Jr." <change@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: zsh Newbie wants to complete mutt email addresses or aliases
- Date: Tue, 30 Apr 2002 14:31:32 -0700
- Cc: zsh-users@xxxxxxxxxx
- In-reply-to: <Pine.LNX.4.44.0204301256310.19152-100000@xxxxxxxxxxxxxxxx>; from schaefer@xxxxxxxxxxxxxxxx on Tue, Apr 30, 2002 at 01:17:26PM -0700
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20020430193409.GA3875@xxxxxxxx> <Pine.LNX.4.44.0204301256310.19152-100000@xxxxxxxxxxxxxxxx>
- Reply-to: "Kingsley G. Morse Jr." <change@xxxxxxx>
Bart,
Thanks for the code.
I'm OK with just completing aliases and appreciate your pragmatic
approach.
However, probably due to my inexperience, I was unable to get your code
to work after
1.) deleting the hard coded email addresses, leaving
zstyle -e ':completion::complete:mutt:*:' users \
'reply=($(perl -ne '\''print "$1\n"
if /^\s+alias\s+(\S+)\s+.*/;'\'' ~/.muttrc 2>/dev/null))'
2.) putting it in .zshrc and restarting zsh, and failing that,
3.) entering it at zsh's prompt.
When I press <tab> after typing the start of an alias, ie:
$ mutt -s "A silly subject" Joe_Do<tab>
zsh returns the same error message as before:
No matches for: `recipient', `login name', `user', or `corrections'
Since I'm so new to zsh, perhaps you can easily suggest what I might try
doing differently.
Thanks,
Kingsley
to work On Tue:13:17, Bart Schaefer wrote:
>
> zstyle -e ':completion::complete:mutt:*:' users \
> 'reply=($(perl -ne '\''print "$1\n"
> if /^\s+alias\s+(\S+)\s+.*/;'\'' ~/.muttrc 2>/dev/null)
> otheraddress@xxxxxxxxxxxxxxx
> anotheraddress@xxxxxxxxxxxxxxxxx
> etcetc@xxxxxxxxxxxxxx)'
>
> You can probably figure out how to extend this to emit the addresses
> from the muttrc alias lines instead of just the alias keywords.
--
Messages sorted by:
Reverse Date,
Date,
Thread,
Author