summaryrefslogtreecommitdiffstats
path: root/scripts/bash_completion
diff options
context:
space:
mode:
authorMichael Olbrich <m.olbrich@pengutronix.de>2012-10-28 15:27:17 +0100
committerMichael Olbrich <m.olbrich@pengutronix.de>2012-10-28 15:48:06 +0100
commit8f94e46cec43753c0c68a6ee090b41d369b61e03 (patch)
tree4ac5040e612a5b76faca7480cf5c359d45637ca5 /scripts/bash_completion
parent74688b353d0643fba23f8a51fbca4270fdd1d5af (diff)
downloadptxdist-8f94e46cec43753c0c68a6ee090b41d369b61e03.tar.gz
ptxdist-8f94e46cec43753c0c68a6ee090b41d369b61e03.tar.xz
bash_completion: options a always valid
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/bash_completion')
-rw-r--r--scripts/bash_completion11
1 files changed, 6 insertions, 5 deletions
diff --git a/scripts/bash_completion b/scripts/bash_completion
index 7d367d3b8..ea3921d58 100644
--- a/scripts/bash_completion
+++ b/scripts/bash_completion
@@ -92,10 +92,10 @@ _ptxdist_completion()
case ${cmd} in
"")
# if no commands were given, complete on commands themselves
- COMPREPLY=( $( compgen -W "${_ptxdist_completion_opts[*]} ${_ptxdist_completion_cmds[*]} help" -- $cur ) )
+ COMPREPLY=( $( compgen -W "${_ptxdist_completion_cmds[*]} help" -- $cur ) )
;;
menuconfig)
- COMPREPLY=( $( compgen -W "${_ptxdist_completion_opts[*]} kernel platform barebox board collection user" -- $cur) )
+ COMPREPLY=( $( compgen -W "kernel platform barebox board collection user" -- $cur) )
;;
clone)
#HACK! Enable filename completion without specifying '-o filenames' during complete (that will add slashes to commands if there is a dir of the same name :( )
@@ -114,20 +114,21 @@ _ptxdist_completion()
COMPREPLY=( root )
;&
get|extract|prepare|compile|install|targetinstall|tags)
- COMPREPLY+=( $( compgen -W "${_ptxdist_completion_opts[*]} $( $_ptxdist_cmd print PTX_PACKAGES_SELECTED 2> /dev/null)" -- $cur ) )
+ COMPREPLY+=( $( compgen -W "$( $_ptxdist_cmd print PTX_PACKAGES_SELECTED 2> /dev/null)" -- $cur ) )
;;
drop)
- COMPREPLY=( $( compgen -W "${_ptxdist_completion_opts[*]} $( cd $($_ptxdist_cmd print PTXDIST_PLATFORMDIR)/state; ls *.+(get|extract|prepare|compile|install|targetinstall) )" -- $cur ) )
+ COMPREPLY=( $( compgen -W "$( cd $($_ptxdist_cmd print PTXDIST_PLATFORMDIR)/state; ls *.+(get|extract|prepare|compile|install|targetinstall) )" -- $cur ) )
;;
newpackage)
if [ ${#_ptxdist_completion_newpkg[@]} -eq 0 ]; then
_ptxdist_completion_newpkg=( $(${_ptxdist_cmd} newpackage | sed -n 's/^ \([^ ]*\) .*$/\1/p') )
fi
if [ ${#args[@]} -lt 1 ]; then
- COMPREPLY=( $( compgen -W "${_ptxdist_completion_opts[*]} ${_ptxdist_completion_newpkg[*]}" -- $cur) )
+ COMPREPLY=( $( compgen -W "${_ptxdist_completion_newpkg[*]}" -- $cur) )
fi
;;
esac
+ COMPREPLY+=( $( compgen -W "${_ptxdist_completion_opts[*]}" -- $cur ) )
[[ $COMPREPLY == *= ]] && compopt -o nospace
return 0
}