Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: scp and noglob
- X-seq: zsh-users 8250
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: scp and noglob
- Date: Mon, 29 Nov 2004 17:59:47 -0800 (PST)
- In-reply-to: <20041129205603.GA5217@xxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20041129205603.GA5217@xxxxxxxxxxxx>
- Reply-to: zsh-users@xxxxxxxxxx
On Mon, 29 Nov 2004, Jens Kubieziel wrote:
> scp $SERVER:*.c .
> Zsh tries to expand *.c and I have to insert a 'noglob'. Is there a way
> to tell zsh to don't expand all filenames which are on the serverside?
If you have zsh 4.2.x, try the url-quote-magic widget that's included in
the Functions/Zle directory in the distribution. Load it like this:
autoload -U url-quote-magic
zle -N self-insert url-quote-magic
Then trick it into treating any hostname as a URL scheme when the command
name is "scp", by doing this (note placement of single/double quotes):
zstyle -e :urlglobber url-other-schema \
'[[ $words[1] == scp ]] && reply=("*") || reply=(http https ftp)'
(Read the comments in the function file for an explanation of why the
context is ":urlglobber", if you care.)
Then just type your scp command and watch what happens.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author