/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.10
completions/vmstat
27 строк
696 B
Ville Skyttä
*: remove spaces immediately within $()
14 апр 2019, 19:07
14 апр 2019, 19:07
90e380b
Код
Авторство
О чём код?
# vmstat(8) completion -*- shell-script -*- _vmstat() { local cur prev words cword _init_completion || return case $prev in --help|--version|--partition|-!(-*)[hVcMNnwp]) return ;; --unit|-!(-*)S) [[ $OSTYPE == *linux* ]] && \ COMPREPLY=( $(compgen -W 'k K m M' -- "$cur") ) return ;; esac if [[ $cur == -* ]]; then COMPREPLY=( $(compgen -W '$(_parse_help "$1")' -- "$cur") ) [[ $COMPREPLY ]] || \ COMPREPLY=( $(compgen -W '$(_parse_usage "$1")' -- "$cur") ) fi } && complete -F _vmstat vmstat # ex: filetype=sh