[devscripts] Fix filename/directory Bash completions (#13620)

Closes #13619
Authored by: barsnick
pull/13677/head
barsnick 3 weeks ago committed by GitHub
parent 7c49a93788
commit 99093e96fd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -10,9 +10,13 @@ __yt_dlp()
diropts="--cache-dir"
if [[ ${prev} =~ ${fileopts} ]]; then
local IFS=$'\n'
type compopt &>/dev/null && compopt -o filenames
COMPREPLY=( $(compgen -f -- ${cur}) )
return 0
elif [[ ${prev} =~ ${diropts} ]]; then
local IFS=$'\n'
type compopt &>/dev/null && compopt -o dirnames
COMPREPLY=( $(compgen -d -- ${cur}) )
return 0
fi

Loading…
Cancel
Save