Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: completion with descriptions
- X-seq: zsh-users 10097
- From: Andy Spiegl <zsh.Andy@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: completion with descriptions
- Date: Tue, 28 Mar 2006 18:35:13 +0200
- In-reply-to: <20060327163058.GA20833@xxxxxxxxx>
- Kinfo: virscan ok
- Kinfo: !spam auth
- Kreccount: 1
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20060327132750.GB27668@xxxxxxxxx> <EXCHANGE03k6gYKeiMH000034a5@xxxxxxxxxxxxxxxxxx> <20060327163058.GA20833@xxxxxxxxx>
> I took _aptitude as a template and came up with the following (see below)
> which works as wanted except for the fact that zsh inserts the _whole_
> line (command + description) instead of just the command. *sigh*
I solved it!
For the records, the problem was an extra space:
> cmds=( ${${(M)${(f)"$(gigaset --commands 2>/dev/null)"}:#* -- *}/(#b) (*[^ ]) #-- (*)/$match[1]:$match[2]:l})
right here ^^^
because my program doesn't begin the lines (in the list of possible
commands) with a space.
After also deleting the ":l" at the end zsh stopped converting all my
German words to lowercase, oh what wonder. :-)
So this works now beautifully:
cmds=( ${${(M)${(f)"$(gigaset --commands 2>/dev/null)"}:#* -- *}/(#b)(*[^ ]) #-- (*)/$match[1]:$match[2]})
Thanks for all the help,
Andy.
--
"security is an exercise in applied paranoia" -- Unknown
Messages sorted by:
Reverse Date,
Date,
Thread,
Author