diff options
author | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-03-26 20:33:55 +0200 |
---|---|---|
committer | Michael Olbrich <m.olbrich@pengutronix.de> | 2018-03-27 08:56:32 +0200 |
commit | f6279a8211856168a2fbb30eeef839a036828080 (patch) | |
tree | 46fa82f1353f37f17390dcb5e4597c421621f2e6 /scripts/bash_completion | |
parent | 580638d22fe9ace849b4f14b0cd5f63d3352dfc7 (diff) | |
download | ptxdist-f6279a8211856168a2fbb30eeef839a036828080.tar.gz ptxdist-f6279a8211856168a2fbb30eeef839a036828080.tar.xz |
bash_completion: cleanup & improve
Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de>
Diffstat (limited to 'scripts/bash_completion')
-rw-r--r-- | scripts/bash_completion | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/bash_completion b/scripts/bash_completion index 9e40bd15b..e0dd34284 100644 --- a/scripts/bash_completion +++ b/scripts/bash_completion @@ -103,20 +103,16 @@ _ptxdist_completion() # if no commands were given, complete on commands themselves COMPREPLY=( $( compgen -W "${_ptxdist_completion_cmds[*]} help" -- $cur ) ) ;; - menuconfig) + *config) 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 :( ) - compgen -f /dummy >/dev/null [ ${#args[@]} -lt 2 ] && _filedir -d ;; toolchain|export_src) - compgen -f /dummy >/dev/null [ ${#args[@]} -lt 1 ] && _filedir -d ;; select|platform|collection|gdb) - compgen -f /dummy >/dev/null [ ${#args[@]} -lt 1 ] && _filedir ;; clean) @@ -136,6 +132,12 @@ _ptxdist_completion() COMPREPLY=( $( compgen -W "${_ptxdist_completion_newpkg[*]}" -- $cur) ) fi ;; + local-src) + if [ ${#args[@]} -lt 1 ]; then + COMPREPLY+=( $( compgen -W "$(__ptxdist_completion_packages)" -- $cur ) ) + else + _filedir -d + fi esac COMPREPLY+=( $( compgen -W "${_ptxdist_completion_opts[*]}" -- $cur ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace |