1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-05-20 02:43:23 -07:00

use expr for substrings

This commit is contained in:
Connor Olding 2018-07-22 13:38:24 +02:00
parent 9bc9ccd535
commit 437009cd79

View File

@ -81,8 +81,7 @@ yt() {
pushd ~/play >/dev/null
local vid="$1"
shift
# can't be bothered to use substrings since they differ across bash/zsh
if [[ "$(head -c4 <<< "$vid")" != "http" ]]; then
if [[ "$(expr substr "$vid" 1 4)" != "http" ]]; then
vid="ytdl://$vid"
fi
mpv --af=lavfi="[$_M_PROCESS]" \