Oups, on ne stocker pas le serveur courant juste dans le scope de la fonction de bash completion.
This commit is contained in:
parent
2caa9f974b
commit
3b1bf0e77f
1 changed files with 4 additions and 2 deletions
|
@ -48,12 +48,14 @@ _cranspasswords(){
|
||||||
# On détermine si on utilsie un serveur alternatif
|
# On détermine si on utilsie un serveur alternatif
|
||||||
if contain "--server" "${COMP_WORDS[*]}"; then
|
if contain "--server" "${COMP_WORDS[*]}"; then
|
||||||
if [[ "$prev" = "--server" ]]; then
|
if [[ "$prev" = "--server" ]]; then
|
||||||
server=$last;
|
_cranspasswords_server=$last;
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
server="default";
|
_cranspasswords_server="default";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
server=$_cranspasswords_server
|
||||||
|
|
||||||
# les options possibles pour notre auto-complétion
|
# les options possibles pour notre auto-complétion
|
||||||
if [[ $cur_first_char = "-" ]]; then
|
if [[ $cur_first_char = "-" ]]; then
|
||||||
COMPREPLY=( $(compgen -W "$opts" -- $cur ) )
|
COMPREPLY=( $(compgen -W "$opts" -- $cur ) )
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue