From 9c47a33c9a0896eda85b22a1c0f16e96a27b6450 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sun, 11 Apr 2021 15:52:48 +0200 Subject: Merging upstream version 20210411. Signed-off-by: Daniel Baumann --- share/bash-completion/container | 27 +++++++++++++-------------- 1 file changed, 13 insertions(+), 14 deletions(-) (limited to 'share/bash-completion') diff --git a/share/bash-completion/container b/share/bash-completion/container index 4e49cec..540f162 100644 --- a/share/bash-completion/container +++ b/share/bash-completion/container @@ -1,7 +1,6 @@ # bash-completion # -# Copyright (C) 2016 Andreas Kreuzer -# Copyright (C) 2016-2021 Daniel Baumann +# Copyright (C) 2014-2021 Daniel Baumann # # SPDX-License-Identifier: GPL-3.0+ # @@ -16,7 +15,7 @@ # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License -# along with this program. If not, see . +# along with this program. If not, see . _container() { @@ -63,13 +62,13 @@ _container() create|cr) case "${prev}" in -n|--name) - opts="$(cd /etc/open-infrastructure/container/debconf 2>/dev/null && ls *.cfg */*.cfg 2>/dev/null | sed -e 's|.*/||g' -e 's|.cfg$||g')" + opts="$(cd /etc/compute-tools/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/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)" + opts="$(cd /usr/share/compute-tools/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 ;; @@ -145,13 +144,13 @@ _container() log) case "${prev}" in -d|--date) - opts="$(if ls /var/log/open-infrastructure/container.log-*.gz > /dev/null 2>&1; + opts="$(if ls /var/log/compute-tools/container.log-*.gz > /dev/null 2>&1; then \ - zcat /var/log/open-infrastructure/container.log-*.gz | awk '{ print $1 }' | sort -u; \ + zcat /var/log/compute-tools/container.log-*.gz | awk '{ print $1 }' | sort -u; \ fi; \ - if [ -e /var/log/open-infrastructure/container.log ]; \ + if [ -e /var/log/compute-tools/container.log ]; \ then \ - awk '{ print $1 }' /var/log/open-infrastructure/container.log | sort -u; \ + awk '{ print $1 }' /var/log/compute-tools/container.log | sort -u; \ fi) \ today yesterday" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) @@ -159,13 +158,13 @@ _container() ;; -n|--name) - opts="$(if ls /var/log/open-infrastructure/container.log-*.gz > /dev/null 2>&1; + opts="$(if ls /var/log/compute-tools/container.log-*.gz > /dev/null 2>&1; then \ - zgrep -E '(\-n|\-\-name) ' /var/log/open-infrastructure/container.log-*.gz | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ + zgrep -E '(\-n|\-\-name) ' /var/log/compute-tools/container.log-*.gz | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ fi; \ - if [ -e /var/log/open-infrastructure/container.log ]; \ + if [ -e /var/log/compute-tools/container.log ]; \ then \ - grep -E '(\-n|\-\-name) ' /var/log/open-infrastructure/container.log | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ + grep -E '(\-n|\-\-name) ' /var/log/compute-tools/container.log | sed -e 's|.*-n ||' -e 's|.*--name ||' -e 's| .*$||' | sort -u; \ fi)" COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) return 0 @@ -286,7 +285,7 @@ _container() ;; *) - local commands=$(cd /usr/lib/open-infrastructure/container 2>/dev/null && find * -type f -print) + local commands=$(cd /usr/libexec/container 2>/dev/null && find * -type f -print) COMPREPLY=( $(compgen -W "${commands}" -- ${cur}) ) return 0 ;; -- cgit v1.2.3