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:
parent
9bc9ccd535
commit
437009cd79
|
@ -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]" \
|
||||
|
|
Loading…
Reference in New Issue
Block a user