* scp and noglob
@ 2004-11-29 20:56 Jens Kubieziel
2004-11-29 22:19 ` Jay Guerette
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Jens Kubieziel @ 2004-11-29 20:56 UTC (permalink / raw)
To: zsh-users
Hi,
I often use scp to transfer multiple files. Assume I want to transfer
all *.c-files, I enter:
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?
Thanks for hints
--
Jens Kubieziel http://www.kubieziel.de
Wer hohe Türme bauen will, muß lange beim Fundament verweilen. Dr. hc.
Anton Bruckner
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scp and noglob
2004-11-29 20:56 scp and noglob Jens Kubieziel
@ 2004-11-29 22:19 ` Jay Guerette
2004-11-30 0:26 ` Philippe Troin
2004-11-30 1:59 ` Bart Schaefer
2 siblings, 0 replies; 5+ messages in thread
From: Jay Guerette @ 2004-11-29 22:19 UTC (permalink / raw)
To: zsh-users
The easiest way is to simply escape the '*'
scp $SERVER:\*.c
On Mon, 29 Nov 2004 21:56:03 +0100, Jens Kubieziel
<maillist@kubieziel.de> wrote:
> I often use scp to transfer multiple files. Assume I want to transfer
> all *.c-files, I enter:
> 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?
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scp and noglob
2004-11-29 20:56 scp and noglob Jens Kubieziel
2004-11-29 22:19 ` Jay Guerette
@ 2004-11-30 0:26 ` Philippe Troin
2004-11-30 9:10 ` David Gómez
2004-11-30 1:59 ` Bart Schaefer
2 siblings, 1 reply; 5+ messages in thread
From: Philippe Troin @ 2004-11-30 0:26 UTC (permalink / raw)
To: Jens Kubieziel; +Cc: zsh-users
Jens Kubieziel <maillist@kubieziel.de> writes:
> Hi,
>
> I often use scp to transfer multiple files. Assume I want to transfer
> all *.c-files, I enter:
> 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?
alias scp='noglob command scp'
maybe?
Phil.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scp and noglob
2004-11-29 20:56 scp and noglob Jens Kubieziel
2004-11-29 22:19 ` Jay Guerette
2004-11-30 0:26 ` Philippe Troin
@ 2004-11-30 1:59 ` Bart Schaefer
2 siblings, 0 replies; 5+ messages in thread
From: Bart Schaefer @ 2004-11-30 1:59 UTC (permalink / raw)
To: zsh-users
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: scp and noglob
2004-11-30 0:26 ` Philippe Troin
@ 2004-11-30 9:10 ` David Gómez
0 siblings, 0 replies; 5+ messages in thread
From: David Gómez @ 2004-11-30 9:10 UTC (permalink / raw)
To: Philippe Troin; +Cc: Jens Kubieziel, zsh-users
Hi Philippe ;),
> > I often use scp to transfer multiple files. Assume I want to transfer
> > all *.c-files, I enter:
> > 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?
>
> alias scp='noglob command scp'
>
> maybe?
But sometimes you need globbing in the client part, so you'll have to
expand (tab-tab) the list to make the command line to work.
regards,
--
David Gómez Jabber ID: davidge@jabber.org
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-11-30 9:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-29 20:56 scp and noglob Jens Kubieziel
2004-11-29 22:19 ` Jay Guerette
2004-11-30 0:26 ` Philippe Troin
2004-11-30 9:10 ` David Gómez
2004-11-30 1:59 ` Bart Schaefer
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).