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

Re: Errors with ssh and rsync completion in zsh-beta (Debian unstable)



On Thu, Jul 05, 2007 at 06:21:57PM +0200, Damien Wyart wrote:
> Playing a bit with completion, I came into the following problem. Having 
> this kind of settings in .zshrc (simplified to get a minimal example) :

You can further simplify that to

users=(dw dwyart root)
zstyle ':completion:*' users $users
autoload -U compinit
compinit

and then..

+_ssh_hosts:7> _combination -s '[:@]' my-accounts users-hosts 'users=dw' hosts -J -default-
+_combination:53> local sep tag style keys pats key num tmp
+_combination:55> [[ -s == -s ]]
+_combination:56> sep='[:@]'
+_combination:57> shift 2
+_combination:65> tag=my-accounts
+_combination:66> style=users-hosts
+_combination:67> shift 2
+_combination:69> keys=( users hosts )
+_combination:70> pats=( '*' '*' )
+_combination:72> [[ 'users=dw' == '*=*' ]]
+_combination:73> tmp=users
+_combination:74> key=users
+_combination:75> num=users
_combination:76: bad math expression: operator expected at `dwyart roo...'
+_combination:76> pats[$keys[(in:num:)$key]]=dw
+_combination:77> shift



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