From 46541ea6fd4e03faf2f07e7cb8ff5160a9398d87 Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Wed, 9 Dec 2020 12:06:17 +0300 Subject: [PATCH] =?UTF-8?q?=D0=A3=D0=BB=D1=83=D1=87=D1=88=D0=B5=D0=BD?= =?UTF-8?q?=D1=8B=20=D0=BF=D1=81=D0=B5=D0=B2=D0=B4=D0=BE=D0=BD=D0=B8=D0=BC?= =?UTF-8?q?=D1=8B=20=D0=B4=D0=BB=D1=8F=20youtube-dl?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- aliases.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/aliases.zsh b/aliases.zsh index 369acf7..4917988 100644 --- a/aliases.zsh +++ b/aliases.zsh @@ -19,7 +19,12 @@ apts() { } # Youtube -alias ydlbest="youtube-dl --merge-output-format mkv -f 'bestvideo+bestaudio'" +YDL="$HOME/bin/youtube-dl" +[ ! -x "$YDL" ] && YDL="$(which youtube-dl)" +if [ -x "$YDL" ]; then + alias ydlbest="youtube-dl --merge-output-format mkv -f 'bestvideo+bestaudio'" + alias ydl="youtube-dl --merge-output-format mkv" +fi # feh alias feh="feh --cache-size 256 --version-sort --sort filename --image-bg black"