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

completions issues



Hi!

I've got some problems with creating my own rule for sms sending
program. Here comes the significant part:

_sms_aliases () {
	compadd "$@" $(print ${(f)"$(smsaddr -l | cut -f1)"})
}
[...]
		_arguments -C \
                        '-r[remove existing entry]:SMS alias:_sms_aliases'

smsaddr returns two columns, completion should be done from both, but
treated as one entry, e. g.:

$ smsaddr -l
alias1		608612341
alias2		504147432
blias3		603648734

$ smsaddr -r a[tab]... lias2
alias1          608612341
alias2          504147432

$ smsaddr -r 6[tab]... 08612341
alias1          608612341
blias3          603648734

so one column will be used as comment.

I will be very grateful for help.

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



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