Unless the URL contains shell meta characters, such as "&"…
The URL of this comment pastes like this, ready to be passed to commands:
https://news.ycombinator.com/edit\?id\=29069520 autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic
autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic
to your zshrc to enable it.It doesn't seem to escape $ (e.g. in <https://example.org/$PATH>), which doesn't inspire confidence…
Are there any equivalents for bash?
zstyle ':url-quote-magic:*' url-metas '*?[]^()~#{}=$'
Not sure about bash, I thought I remembered seeing something similar for it but a quick google doesn't turn up anything.