don't assign customizeable variables if they're in the user's environment

This commit is contained in:
dtb 2023-11-08 18:31:48 -07:00
parent 301588ca52
commit 3714c02588

8
yt
View File

@ -20,10 +20,12 @@ set -e
argv0="$0" argv0="$0"
com="$1" com="$1"
cachefile="$XDG_CACHE_HOME/yt.cache"
FMT='%(title)s %(channel)s (%(duration>%H:%M:%S)s) [%(webpage_url)s]' FMT='%(title)s %(channel)s (%(duration>%H:%M:%S)s) [%(webpage_url)s]'
WBAPI='https://archive.org/wayback/available?url='
test -n "$cachefile" \
|| cachefile="$XDG_CACHE_HOME/yt.cache"
test -n "$WBAPI" \
|| WBAPI='https://archive.org/wayback/available?url='
add() { # adds a video to a playlist file add() { # adds a video to a playlist file
while test -n "$2"; do while test -n "$2"; do