/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.2
completions/function
22 строки
689 B
Matthew Gamble
Modify all usages of 'sed' to be run with command bash builtin
25 фев 2016, 11:31
25 фев 2016, 11:31
1aad419
Код
Авторство
О чём код?
# bash shell function completion -*- shell-script -*- _function() { local cur prev words cword _init_completion || return if [[ $1 == @(declare|typeset) ]]; then if [[ $prev == -f ]]; then COMPREPLY=( $( compgen -A function -- "$cur" ) ) elif [[ "$cur" == -* ]]; then COMPREPLY=( $( compgen -W '$( _parse_usage "$1" )' -- "$cur" ) ) fi elif [[ $cword -eq 1 ]]; then COMPREPLY=( $( compgen -A function -- "$cur" ) ) else COMPREPLY=( "() $( type -- ${words[1]} | command sed -e 1,2d )" ) fi } && complete -F _function function declare typeset # ex: ts=4 sw=4 et filetype=sh