summaryrefslogtreecommitdiffstats
path: root/share/bash-completion
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-11 13:52:42 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2021-04-11 13:52:42 +0000
commitc759c2b9c54ba0262980214cd3d7cb6566ed7c7b (patch)
treee54395585d3605a86e91680ea200779058cc10e5 /share/bash-completion
parentAdding upstream version 20210101. (diff)
downloadopen-infrastructure-compute-tools-c759c2b9c54ba0262980214cd3d7cb6566ed7c7b.tar.xz
open-infrastructure-compute-tools-c759c2b9c54ba0262980214cd3d7cb6566ed7c7b.zip
Adding upstream version 20210411.upstream/20210411
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'share/bash-completion')
-rw-r--r--share/bash-completion/container27
1 files changed, 13 insertions, 14 deletions
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 <andreas.kreuzer@open-infrastructure.net>
-# Copyright (C) 2016-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
+# Copyright (C) 2014-2021 Daniel Baumann <daniel.baumann@open-infrastructure.net>
#
# 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 <http://www.gnu.org/licenses/>.
+# along with this program. If not, see <https://www.gnu.org/licenses/>.
_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
;;