diff options
Diffstat (limited to 'share/bash-completion')
-rw-r--r-- | share/bash-completion/container | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/share/bash-completion/container b/share/bash-completion/container index 3f1f271..b7a73ae 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -1,6 +1,5 @@ # bash-completion # -# container-tools - Manage systemd-nspawn containers # Copyright (C) 2016 Andreas Kreuzer <andreas.kreuzer@open-infrastructure.net> # Copyright (C) 2016-2019 Daniel Baumann <daniel.baumann@open-infrastructure.net> # @@ -64,13 +63,13 @@ _container() create) case "${prev}" in -n|--name) - opts="$(cd /etc/container-tools/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')" + opts="$(cd /etc/open-infrastructure/container/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; -s|--script) - opts="$(cd /usr/share/container-tools/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)" + opts="$(cd /usr/share/open-infrastructure/container/scripts && find -maxdepth 1 -not -type d -and -not -name 'default' -and -not -name 'debconf' -and -not -name '*.d' -printf '%P\n' | sort)" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 ;; @@ -146,13 +145,13 @@ _container() log) case "${prev}" in -d|--date) - opts="$(if ls /var/log/container-tools/container.log-*.gz > /dev/null 2>&1; + opts="$(if ls /var/log/open-infrastructure/container.log-*.gz > /dev/null 2>&1; then \ - zcat /var/log/container-tools/container.log-*.gz | awk '{ print $1 }' | sort -u; \ + zcat /var/log/open-infrastructure/container.log-*.gz | awk '{ print $1 }' | sort -u; \ fi; \ - if [ -e /var/log/container-tools/container.log ]; \ + if [ -e /var/log/open-infrastructure/container.log ]; \ then \ - awk '{ print $1 }' /var/log/container-tools/container.log | sort -u; \ + awk '{ print $1 }' /var/log/open-infrastructure/container.log | sort -u; \ fi) \ today yesterday" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) @@ -160,13 +159,13 @@ _container() ;; -n|--name) - opts="$(if ls /var/log/container-tools/container.log-*.gz > /dev/null 2>&1; + opts="$(if ls /var/log/open-infrastructure/container.log-*.gz > /dev/null 2>&1; then \ - zgrep -E '(\-n|\-\-name) ' /var/log/container-tools/container.log-*.gz | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ + zgrep -E '(\-n|\-\-name) ' /var/log/open-infrastructure/container.log-*.gz | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ fi; \ - if [ -e /var/log/container-tools/container.log ]; \ + if [ -e /var/log/open-infrastructure/container.log ]; \ then \ - grep -E '(\-n|\-\-name) ' /var/log/container-tools/container.log | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ + grep -E '(\-n|\-\-name) ' /var/log/open-infrastructure/container.log | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ fi)" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 @@ -287,7 +286,7 @@ _container() ;; *) - local commands=$(cd /usr/lib/container-tools/container 2>/dev/null && find * -type f -print) + local commands=$(cd /usr/lib/open-infrastructure/container 2>/dev/null && find * -type f -print) COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) return 0 ;; |