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

Re: zsh Newbie wants to complete mutt email addresses or aliases



On Tue:16:54, Marius Strom wrote:
> Take out the initial \s+
[...]

Thanks! 

It worked!

Two minor observations:

1.) Although the zstyle/perl code worked as we expected when I entered it
at zsh's prompt, when I added it to .zshrc and subsequently started zsh,
it reported 

        "no such file or directory"

until I appended the first two (out of three) lines of the code. The
resulting .zshrc code that works for me is

        zstyle -e ':completion::complete:mutt:*:' users 'reply=($(perl -ne '\''print "$1\n"
                  if /^\s*alias\s+(\S+)\s+.*/;'\'' ~/.muttrc 2> /dev/null ))'

2.) Now when I use <tab> to complete mutt's email aliases, the completed
aliases sometimes end with an "@", which conveniently goes away when I
press <enter> to run mutt.


All in all... all's well that ends well.

Marius: I like your lost cable signature.

All: As a small token of my appreciation for your time and attention,
here's a tame joke:

        Q: How much does it cost to pierce a pirate's ears?

        A: A buccaneer!

Thanks,
Kingsley



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