/
githubmirror
/
cheat.sh
Обзор
Документация
Войти
/
githubmirror
/
cheat.sh
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
share/bash_completion.txt
17 строк
386 B
Igor Chubin
renamed cheat client to cht.sh: bash completion
19 май 2018, 23:03
19 май 2018, 23:03
4d8ac94
Код
Авторство
О чём код?
_cht_complete() { local cur prev opts _get_comp_words_by_ref -n : cur COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" opts="$(curl -s cheat.sh/:list)" if [ ${COMP_CWORD} = 1 ]; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) __ltrim_colon_completions "$cur" fi return 0 } complete -F _cht_complete cht.sh