|
|
@ -61,13 +61,17 @@ function _miaou_exec() { |
|
|
|
|
|
|
|
|
if ((COMP_CWORD == 3)); then |
|
|
if ((COMP_CWORD == 3)); then |
|
|
# command or file from inside container |
|
|
# command or file from inside container |
|
|
|
|
|
|
|
|
|
|
|
# echo -e "\nCOMMAND or FILE from CONTAINER\n" >&2 |
|
|
COMPREPLY=($( |
|
|
COMPREPLY=($( |
|
|
incus exec "$container" -- bash << EOF |
|
|
incus exec "$container" -- bash << EOF |
|
|
|
|
|
bind -f /etc/inputrc 2>/dev/null |
|
|
source /etc/bash_completion |
|
|
source /etc/bash_completion |
|
|
compgen -c -- "$cur" |
|
|
compgen -c -- "$cur" |
|
|
|
|
|
compgen -f -- "$cur" |
|
|
EOF |
|
|
EOF |
|
|
)) |
|
|
)) |
|
|
|
|
|
compopt -o filenames |
|
|
|
|
|
compopt -o nospace |
|
|
return |
|
|
return |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
@ -94,6 +98,7 @@ EOF |
|
|
# echo -e "\ncompletion_command $completion_command \nprev=$prev \ncur=$cur \nCOMP_WORDS=(${COMP_WORDS[@]}) \nCOMP_CWORD=$COMP_CWORD \nCOMP_LINE=$COMP_LINE \nCOMP_POINT=$COMP_POINT" >&2 |
|
|
# echo -e "\ncompletion_command $completion_command \nprev=$prev \ncur=$cur \nCOMP_WORDS=(${COMP_WORDS[@]}) \nCOMP_CWORD=$COMP_CWORD \nCOMP_LINE=$COMP_LINE \nCOMP_POINT=$COMP_POINT" >&2 |
|
|
COMPREPLY=($( |
|
|
COMPREPLY=($( |
|
|
incus exec "$container" -- bash << EOF |
|
|
incus exec "$container" -- bash << EOF |
|
|
|
|
|
bind -f /etc/inputrc 2>/dev/null |
|
|
source /etc/bash_completion |
|
|
source /etc/bash_completion |
|
|
for i in /etc/bash_completion.d/*; do source \$i; done |
|
|
for i in /etc/bash_completion.d/*; do source \$i; done |
|
|
source /usr/share/bash-completion/bash_completion |
|
|
source /usr/share/bash-completion/bash_completion |
|
|
@ -115,10 +120,12 @@ EOF |
|
|
fi |
|
|
fi |
|
|
|
|
|
|
|
|
else |
|
|
else |
|
|
|
|
|
echo -e "\nNO completion_command JUST plain files and firs" >&2 |
|
|
compopt -o filenames |
|
|
compopt -o filenames |
|
|
compopt -o nospace |
|
|
compopt -o nospace |
|
|
COMPREPLY=($( |
|
|
COMPREPLY=($( |
|
|
incus exec "$container" -- bash << EOF |
|
|
incus exec "$container" -- bash << EOF |
|
|
|
|
|
bind -f /etc/inputrc 2>/dev/null |
|
|
source /etc/bash_completion |
|
|
source /etc/bash_completion |
|
|
compgen -f "$cur" 2>/dev/null |
|
|
compgen -f "$cur" 2>/dev/null |
|
|
EOF |
|
|
EOF |
|
|
|