| Summary: | Добавьте утилите control bash-автодополнение | ||
|---|---|---|---|
| Product: | Sisyphus | Reporter: | LinInstr <lininstr> |
| Component: | control | Assignee: | Dmitry V. Levin <ldv> |
| Status: | UNCONFIRMED --- | QA Contact: | qa-sisyphus |
| Severity: | enhancement | ||
| Priority: | P5 | CC: | cas, ldv, placeholder |
| Version: | unstable | ||
| Hardware: | all | ||
| OS: | Linux | ||
Надо добавить в пакет файл /etc/bash_completion.d/control со следующим содержанием:
function _control()
{
latest="${COMP_WORDS[$COMP_CWORD]}"
prev="${COMP_WORDS[$COMP_CWORD - 1]}"
words=""
case "${prev}" in
control) words="$(ls /etc/control.d/facilities/)" ;;
*) words="$([ -f "/etc/control.d/facilities/$prev" ] && {
control "$prev" list;
echo help status
}; )" ;;
esac
COMPREPLY=($(compgen -W "$words" -- $latest))
return 0
}
complete -F _control control
|
Надо добавить файл /etc/bash_completion.d/control со следующим содержанием: function _control() { latest="${COMP_WORDS[$COMP_CWORD]}" prev="${COMP_WORDS[$COMP_CWORD - 1]}" words="" case "${prev}" in control) words="$(ls /etc/control.d/facilities/)" ;; *) words="$([ -f "/etc/control.d/facilities/$prev" ] && { control "$prev" list; echo help status }; )" ;; esac COMPREPLY=($(compgen -W "$words" -- $latest)) return 0 } complete -F _control control