| 1 |
# http://www.debian-administration.org/articles/316 |
| 2 |
# À renommer en /etc/bash_completion.d/wxgeometrie |
| 3 |
_wxgeometrie() |
| 4 |
{ |
| 5 |
local cur prev opts |
| 6 |
COMPREPLY=() |
| 7 |
cur="${COMP_WORDS[COMP_CWORD]}" |
| 8 |
prev="${COMP_WORDS[COMP_CWORD-1]}" |
| 9 |
opts="--all --debug --defaut --help --nouveau --recompile --version" |
| 10 |
|
| 11 |
# Complete the modules names. |
| 12 |
# |
| 13 |
case "${prev}" in |
| 14 |
-m) |
| 15 |
local running="geometre traceur statistiques calculatrice probabilites surfaces cryptographie exercice_equations_droites exercice_inequations_produits exercice_tableau_signes exercice_trigonometrie graphes tablatex" |
| 16 |
COMPREPLY=( $(compgen -W "${running}" -- ${cur}) ) |
| 17 |
return 0 |
| 18 |
;; |
| 19 |
*) |
| 20 |
;; |
| 21 |
esac |
| 22 |
|
| 23 |
if [[ ${cur} == -* ]] ; then |
| 24 |
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) |
| 25 |
return 0 |
| 26 |
fi |
| 27 |
} |
| 28 |
complete -F _wxgeometrie wxgeometrie |