Replaced yt alias with yt script

This commit is contained in:
z3rOR0ne 2022-09-07 04:38:01 -07:00
parent 91984d2a6b
commit bccb2dbbc5
2 changed files with 16 additions and 2 deletions

14
scripts/yt Executable file
View file

@ -0,0 +1,14 @@
#!/bin/bash
lastarg=("${@: -1}")
search=""
for ARG in "${@}" ; do
if [[ $ARG == "${lastarg[1]}" ]] ; then
search+="${ARG}"
else
search+="${ARG}+"
fi
done
$BROWSER https://www.youtube.com/results?search_query="${search}" &