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
|
||||
if contain "--server" "${COMP_WORDS[*]}"; then
|
||||
if [[ "$prev" = "--server" ]]; then
|
||||
server=$last;
|
||||
_cranspasswords_server=$last;
|
||||
fi
|
||||
else
|
||||
server="default";
|
||||
_cranspasswords_server="default";
|
||||
fi
|
||||
|
||||
server=$_cranspasswords_server
|
||||
|
||||
# les options possibles pour notre auto-complétion
|
||||
if [[ $cur_first_char = "-" ]]; then
|
||||
COMPREPLY=( $(compgen -W "$opts" -- $cur ) )
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue