ref: refs/heads/master
commit 2b8a5de712d9971a9169f98d301bc038c7d886c6
Author: Josef Reidinger
Date: Wed Feb 11 13:51:54 2009 +0100
Bash completion: allow repo alias completion also for modifyrepo and removerepo.
---
src/bash-completion.sh | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/src/bash-completion.sh b/src/bash-completion.sh
index ae4a472..5376d8b 100644
--- a/src/bash-completion.sh
+++ b/src/bash-completion.sh
@@ -55,6 +55,7 @@ _zypper() {
;;
removerepo)
opts=$(LC_ALL=C $ZYPPER help $prev 2>&1 | sed -e "1,/$magic_string/d" -e 's/.*--/--/' -e 's/ .*//')
+ opts="${opts} $(LC_ALL=C $ZYPPER lr | sed -e '1,2 d' -e 's/^[0-9]\+[[:space:]]\+|[[:space:]]*\([^|]\+\)|.*$/\1/' -e 's/[[:space:]]*$//')"
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
;;
renamerepo)
@@ -64,6 +65,7 @@ _zypper() {
;;
modifyrepo)
opts=$(LC_ALL=C $ZYPPER help $prev 2>&1 | sed -e "1,/$magic_string/d" -e 's/.*--/--/' -e 's/ .*//')
+ opts="${opts} $(LC_ALL=C $ZYPPER lr | sed -e '1,2 d' -e 's/^[0-9]\+[[:space:]]\+|[[:space:]]*\([^|]\+\)|.*$/\1/' -e 's/[[:space:]]*$//')"
COMPREPLY=($(compgen -W "${opts}" -- ${cur}))
;;
refresh)
--
To unsubscribe, e-mail: zypp-commit+unsubscribe@opensuse.org
For additional commands, e-mail: zypp-commit+help@opensuse.org