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

Re: [ejb@xxxxxx: Bug#243385: zsh: rsync completion expands * too soon]




>   I assume that this is a quoting issue again.

Yes.  Well, kind of.  It's an eval issue.  The call to _call_program
(which I have removed) causes the wildcard to be expanded too early
because it calls eval.  Here's a trace excerpt.

+_rsync_remote_files:37> remfiles=+_rsync_remote_files:1> _call_program files ssh -a -x apex ls -d1F '/*'
+_call_program:3> local tmp
+_call_program:5> zstyle -s :completion::complete:rsync:argument-rest:files command tmp
+_call_program:12> eval 'ssh -a -x apex ls -d1F /*'
+(eval):1> ssh -a -x apex ls -d1F /bin /boot /cdrom /cdrom0 /dark /dark2 /dev /etc /fc1 /floppy /home /initrd /initrd.img /initrd.img.old /lib /mnt /opt /proc /projects /.rnd /root /sbin /smb /sys /systems /tmp /tmp-Xhack /u1 /u2 /usr /var /vmlinuz
+_rsync_remote_files:37> remfiles=( /bin/ /boot/ /dev/ /etc/ /home@ /initrd/ /lib/ /mnt/ /opt/ /proc/ /projects@ /root/ /sbin/ /smb/ /systems/ /tmp/ /usr/ /var/ )
The ls command ("(eval:1)" above) does an ls on the remote system
after having expanded the wildcard on my local system.

--Jay



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