From b1e86fd7e719ff243535751cf8bc3c75f8531f29 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 5 Sep 2022 14:08:27 +0100 Subject: porting some ksh aliases and functions to fish --- fish/functions/ytmp3.fish | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 fish/functions/ytmp3.fish (limited to 'fish/functions/ytmp3.fish') diff --git a/fish/functions/ytmp3.fish b/fish/functions/ytmp3.fish new file mode 100644 index 0000000..f66467e --- /dev/null +++ b/fish/functions/ytmp3.fish @@ -0,0 +1,7 @@ +function ytmp3 --description 'Download YouTube video or playlist as audio' --argument url + if test -n "$url" + cd ~/Downloads && yt-dlp -f 'ba' -x --audio-format mp3 "$url" -o '%(title)s.%(ext)s' && cd - || return + else + echo "Please give me a URL." + end +end -- cgit v1.2.3