Sample Header Ad - 728x90

How to write a function that takes an argument string that does not need to be quoted?

1 vote
1 answer
325 views
I'm writing a function, adding it to ~/.zshrc on my Mac. It's in order to more quickly handle commands to youtube-dl. I have this:
function dlv()
{
        cd /Users/admin/Downloads
        youtube-dl -f 'best' "$1"
}
But when I make a request I have to input the youtube link with quote marks. dlv "https://www.youtube.com/watch?v=dQw4w9WgXcQ " instead of dlv https://www.youtube.com/watch?v=dQw4w9WgXcQ How can I achieve this?
Asked by Alfie Stoppani (35 rep)
Jan 15, 2023, 02:29 PM
Last activity: Jan 16, 2023, 07:17 PM