Zsh URL problem

I have a small problem which I hope some of you can help me solve.

I always use a few bash functions . One of which plays music from youtube using this function.

mpvmusic () { mpv --no-config --volume=70 --ytdl-format=bestaudio "$1" }

Now I am not used to zsh though I'm starting to like it. A lot. The problem is the function doesn't work in zsh unless I quote the URL. It says zsh : no matches found.

Is there a way to modify the zshrc so that I don't have to quote the URL. I once solved this in Manajro long ago. But forgot what I did. Any help would be much appreciated.

1 Like

Just type

Then it will run bash

And then run your bash commands



Yes. And this may sound silly but I don't want to use bash. :sweat_smile:

autoload -Uz bracketed-paste-magic
zle -N bracketed-paste bracketed-paste-magic

autoload -Uz url-quote-magic
zle -N self-insert url-quote-magic

Putting that in zshrc automatically quotes the URL. Or at least it seems to. Some more testing required.

1 Like

wow! I did not know that. thank you