trying to come up with some advice around quoting/escaping/tab completion in the shell and not coming up with as much as I thought I would! so far I have:

- sometimes you can drag a file from a GUI file manager to escape it properly
- tab completion is great

mostly looking for advice around using the shell interactively, not scripting (so not "always quote your shell variables”)

@b0rk Use zsh’s url-quote-magic to automatically quote pasted URLs. I love this one! No need to use single quotes with curl anymore

https://github.com/samsonjs/config/blob/9a32974419a416006aa34a78471649a5ffaa034f/zshrc#L180

config/zshrc at 9a32974419a416006aa34a78471649a5ffaa034f · samsonjs/config

config files for linux and os x. Contribute to samsonjs/config development by creating an account on GitHub.

GitHub
@sjs @b0rk note that if you have bracketed-paste enabled (which it is by default), you also need to run zle -N bracketed-paste bracketed-paste-magic; see https://docs.jade.fyi/zsh/zsh.html#index-bracketed_002dpaste_002dmagic
zsh

zsh

@jyn @b0rk I’m not exactly sure what this does but thank you for the tip! I’ll turn it on and see whether I notice a difference
@sjs @b0rk it tells you in the docs ...
@jyn @b0rk Yes I just don’t really understand it
@sjs @b0rk run zle -N bracketed-paste bracketed-paste to see what happens when it's disabled