@hrisskar To be honest, I'm kind of overwhelmed by seeing that ` && youtube-dl`. It's convention for a CLI tool that accepts one path or URL as input to accept any number of them in a single invocation.
Also, single quotes are only needed for a YouTube or Invidious URL if it contains ampersands which the shell would otherwise interpret as the "run in background" version of a semicolon.
Example:
youtube-dl https://www.youtube.com/watch?v=cIANk7zQ05w https://www.youtube.com/watch?v=Pwe-pA6TaZk https://www.youtube.com/watch?v=_7X6Yeydgyg
@hrisskar That's odd. I'm also using zsh and it works fine here.
Probably some zsh config flag that Manjaro defaults differently to Debian-family distros.
Try sticking echo on the beginning of the command and see what it prints. Maybe it's interpreting the ? as a globbing character and it's configured to remove unmatched globs rather than passing them through as literals. (Bash has an option to do that too)
@ssokolow Something like this:
youtube-dl -ciw https://invidio.us/watch?v=dFDgf33gSf -o /run/media/blah/Blah de Blah/ya ya/%(title)s.%(ext)s
@hrisskar Oh, you've got an alias or shell function redefining it.
Tell me what `which youtube-dl` says and I'll tell you how to alter it to handle multiple arguments properly.
@hrisskar Sorry. Force of habit. I'm used to using Markdown code snippet syntax everywhere.
Tell me what "which youtube-dl" (without quotes of any kind) says.
@ssokolow
/usr/bin/youtube-dl
@hrisskar Hmm. Unlike bash, zsh's "which" is a shell builtin, so it'll identify functions and aliases.
That it gave you a path suggests that it's getting converted to "youtube-dl -ciw ..." some other way. (Or I misunderstood you.)
First, try prefixing it with "command" to see if that alters its behaviour (eg. "command youtube-dl https://www.youtube.com/watch?v=Xc4xYacTu-E https://www.youtube.com/watch?v=T2br1fAKOGU")
("command" tells a shell like bash or zsh to bypass aliases, functions, builtins, etc. and call the on-disk command)
@hrisskar Oh, correction. Put quotes around that. Right now, I just want to get you to reliable not needing ` && youtube-dl` while I find the name of the shell option I suspect of being the culprit for needing the quotes.
@ssokolow And thank you for your help so far! I'm a newbie to #Linux (especially the command-line) and I wanna learn moar and moar as I go along.
One thing I wish I knew a few days ago is you could use youtube-dl to not only download ONLY the audio, but ALSO convert to mp3s/oggs/etc in the same command! I had intended to download all the videos from several channels like Cryo Chamber (which are more-or-less only music) and THEN use ffmpeg to convert the saved vids...
@hrisskar No problem. I enjoy sharing knowledge.
With youtube-dl, are you referring just to the post-download conversion or were you also aware that some sites (YouTube included) offer separate audio and video streams to their players, so you can download just the audio and avoid having to discard the video before converting to your desired format?
For example:
youtube-dl -f 251 -x --audio-format vorbis https://www.youtube.com/watch?v=Pwe-pA6TaZk
("youtube-dl -F THE_URL" will list the formats you can ask for with "youtube-dl -f")
@ssokolow Yep. I... didn't learn about downloading specific formats before downloading hundreds of "videos" like below -- which amount to a still image with background music; I only wanted the music:
https://invidious.snopyta.org/watch?v=UuuPbwN97Jc&autoplay=1
@hrisskar Not my cup of tea. I'm more into melodic music than rhythmic.
Anyway, I need to prepare for bed but, if you'd like, once I'm up again, I could show you some other interesting zsh stuff I use.
(For example, if you're not already using it, "setopt AUTO_PUSHD" will make "cd" act like "pushd" and build up an undo stack you can rewind with "popd")
@hrisskar *chuckle* If you want to be a TRU3 H4X0R, the first thing to do is get a drop-down terminal emulator like Yakuake, Guake, or Tilda.
@ssokolow I should give one of these a shot to see how I like hotkeying a terminal back and forth instead of keeping a window up (but behind a maximized window) most the time!
@ssokolow Sounds useful for if and when I ever get around to depending less on GUI and be more command-line-ey like a TRVE H4X0R