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

scp and globbing in zsh



I migrated from bash to zsh about a month ago (loving it) and there is
still one thing I cannot figure out. I would like to be able to use
regex (at least the *) with scp. For example:

$ scp someserver:~/tmp/*.txt  .
$ scp *.txt  someserver:~/tmp/

The first one fails with globbing because it seems to be looking for
~/tmp/*.txt on my local machine instead of the remote machine but the
second command works fine. With no globbing set for scp the first
command works but the second command fails.

I could just put single quotes around the server path to get it to
work with globbing but after many years of bash I am having trouble
getting into the habbit of using single quotes with scp and it get's
pretty frustrating.

Is there a way to get this to work so that both of the above commands
work as expected without having to use single quotes? Thanks for any
input.
-- 
allucid
allucid@xxxxxxxxx



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