/
githubmirror
/
bash-completion
Обзор
Документация
Войти
/
githubmirror
/
bash-completion
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
2.16.0
completions/_insmod
21 строка
664 B
Emil Velikov
refactor(insmod): deprecate in favor of upstream one in >= 34
08 ноя 2024, 19:23
08 ноя 2024, 19:23
c7213bd
Код
Авторство
О чём код?
# Linux insmod(8) completion -*- shell-script -*- # Use of this file is deprecated. # Upstream completion is available in kmod >= 34, use that instead. _comp_cmd_insmod() { local cur prev words cword comp_args _comp_initialize -- "$@" || return # do filename completion for first argument if ((cword == 1)); then _comp_compgen_filedir '@(?(k)o?(.[gx]z|.zst))' else # do module parameter completion _comp_compgen_split -- "$(PATH="$PATH:/sbin" modinfo \ -p "${words[1]}" 2>/dev/null | cut -d: -f1)" fi } && complete -F _comp_cmd_insmod insmod insmod.static # ex: filetype=sh