/
githubmirror
/
yt-dlp
Обзор
Документация
Войти
/
githubmirror
/
yt-dlp
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
devscripts/bash-completion.in
33 строки
998 B
sepro
[cleanup] Misc (#13852)
11 авг 2025, 06:18
Не верифицирован
11 авг 2025, 06:18
5e4ceb3
Код
Авторство
О чём код?
__yt_dlp() { local cur prev opts fileopts diropts keywords COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="{{flags}}" keywords=":ytfavorites :ytrecommended :ytsubscriptions :ytwatchlater :ythistory" fileopts="-a|--batch-file|--download-archive|--cookies|--load-info-json" 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 if [[ ${cur} =~ : ]]; then COMPREPLY=( $(compgen -W "${keywords}" -- ${cur}) ) return 0 elif [[ ${cur} == * ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 fi } complete -F __yt_dlp yt-dlp