-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zsh expands arguments to scp/rsync #232
Comments
Would |
Yeah that's another possible solution. Do you think alias is better? |
Yes, the following should fix the problem. I'm not sure why there is a alias rsync='noglob rsync'
alias scp='noglob scp' Is there anything else in utility that should be |
I need an answer to my last question to know if I should just push with just those two aliases. |
Probably ftp and sftp should go into that list as well. That's all I can think of for now. |
* upstream/master: [Fix sorin-ionescu#233] Bind history-substring-search using $key_info [Fix sorin-ionescu#232] Disable globbing for rsync, scp, ftp, sftp Add missing theme screenshots Update comments in themes Simplify and clean up the steeef theme Remove unnecessary checks in steeef [Fix sorin-ionescu#230] Check the expanded command in steeef preexec Ensure that $terminfo values are valid Rename templates to runcoms Clarify a comment about GNU utilities Wrap editor module documentation at 80 characters Increase heading readability [Fix sorin-ionescu#202] Load modules all or nothing
…etion add rubocop completion
I know this topic is closed, but my solution for both rsync and scp follows: In my ~/.zshrc I put:
|
Since the |
Answered my own question (less than a minute later, sorry for the noise). The answer is |
Sorin, I don't know if you want to integrate this little hack, or if there's a better way around. But I found zsh is a little annoying with the way you have to handle arguments to remote commands like scp/rsync. For example if you try to
rsync remote:/path/to/* .
then it gives you an error likeno matches found
because it tries to expand the star glob locally.The following link has a small bit of zsh code that combats that by auto escaping globs in remote commands.
http://superuser.com/questions/420525/scp-with-zsh-no-matches-found
Here is the code fragment:
autoload -U url-quote-magic zle -N self-insert url-quote-magic zstyle -e :urlglobber url-other-schema \ '[[ $words[1] == scp ]] && reply=("*") || reply=(http https ftp)'
What are your thoughts on this, as I am too much of a zsh noob to know if this is a good solution. It does seem to work...
The text was updated successfully, but these errors were encountered: