From 042379a84cc73c14bfff6465ee40c8237605b670 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 24 Jul 2008 14:37:47 -0400 Subject: Apply John V's latest work on bash completion script --- config/cobbler_bash | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'config') diff --git a/config/cobbler_bash b/config/cobbler_bash index 9b558721..20556dd2 100644 --- a/config/cobbler_bash +++ b/config/cobbler_bash @@ -31,7 +31,7 @@ _cobbler() prev=${COMP_WORDS[COMP_CWORD-1]} # Let's only run it once - SPECIAL_CMDS=`cobbler --helpbash | sed "s/ /|/g"` + SPECIAL_CMDS=`cobbler-completion | sed "s/ /|/g"` for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do if [[ ${COMP_WORDS[i]} == @(${SPECIAL_CMDS}) ]]; then special=${COMP_WORDS[i]} @@ -42,7 +42,7 @@ _cobbler() if [ -n "$special" ] then # Take care of sub commands - SPECIALSUB_CMDS=`cobbler $special --helpsubs | sed "s/ /|/g"` + SPECIALSUB_CMDS=`cobbler-completion $special | sed "s/ /|/g"` if [ -n "${SPECIALSUB_CMDS}" ] ; then for (( i=0; i < ${#COMP_WORDS[@]}-1; i++ )); do if [[ ${COMP_WORDS[i]} == @(${SPECIALSUB_CMDS}) ]]; then @@ -52,16 +52,16 @@ _cobbler() done else # This command has no subcommands - COMPREPLY=( $( compgen -f -W '$( cobbler $special --helpopts )' -- $cur ) ) + COMPREPLY=( $( compgen -f -W '$( cobbler-completion $special )' -- $cur ) ) return 0 fi if [ -n "$specialsub" ] then - COMPREPLY=( $( compgen -f -W '$( cobbler $special $specialsub --helpopts )' -- $cur ) ) + COMPREPLY=( $( compgen -f -W '$( cobbler-completion $special $specialsub )' -- $cur ) ) return 0 else - COMPREPLY=( $( compgen -W '$( cobbler $special --helpsubs )' -- $cur ) ) + COMPREPLY=( $( compgen -W '$( cobbler-completion $special )' -- $cur ) ) return 0 fi fi -- cgit