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

Re: completions issues



On Sun, Jul 14, 2002 at 12:57:10 +0400, Borsenkow Andrej wrote:

> > gotar:~: smsaddr -l r[tab]
> > SMS alias
> > rtrzepla -- 692xxx
> > 
> > gotar:~: smsaddr -l 6[tab]
> > SMS alias
> > 600xxx -- prudy
> 
> Oh, if you want _this_ you do not need any perl magic at all. Just add
> all your SMS aliases two times - once as alias:number and second time as
> number:alias. Completion does all matching for you.

No no no, adding both will cause showing them _all_ when completion
without any prefix - and I don't want doubled entries like this:

gotar:~: smsaddr -l [tab]
SMS alias
rtrzepla -- 692xxx
692xxx   -- rtrzepla

> I assumed you always to always have alias name as match and number as
> description.

No, it should be dynamically switched for every entry separately, e. g.

gotar:~: smsaddr -l [tab]
SMS alias
6bone    -- 509xxx
admol    -- 602xxx

gotar:~: smsaddr -l 6[tab]
SMS alias
602xxx -- admol
6bone  -- 509xxx

As you can see here - 6 is used as prefix to alias OR number and part
without it is used as description.

-- 
GoTaR <gotar@xxxxxxxxxxxxx>
PLD stuff at http://mops.uci.agh.edu.pl/~gotar/



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