From d734bf40446fefb17ed02331aabb3548e9706c1e Mon Sep 17 00:00:00 2001 From: Jeff Carr Date: Sat, 19 Jan 2019 18:17:04 -0500 Subject: [PATCH] I have no memory so I love bash completion Signed-off-by: Jeff Carr --- u-boot/uboot | 11 ++++++++--- u-boot/uboot-bash-completion | 12 ++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100644 u-boot/uboot-bash-completion diff --git a/u-boot/uboot b/u-boot/uboot index a9d40ef..1258486 100755 --- a/u-boot/uboot +++ b/u-boot/uboot @@ -32,8 +32,9 @@ case "$1" in echo uboot did not successfully compile fi ;; - stop|status) - echo stop or status $1 + branches|status) + git remote -v + git branch -r ;; start) echo try start @@ -47,7 +48,11 @@ case "$1" in ;; *) - echo something else $1 + echo + echo 'uboot branches -- shows the git repos and branches' + echo 'uboot clean -- purges more or less absolutely everything except .*' + echo 'uboot build -- builds uboot for the pinebook' + echo 'uboot flash -- flashes uboot onto the host "witserial"' ;; esac diff --git a/u-boot/uboot-bash-completion b/u-boot/uboot-bash-completion new file mode 100644 index 0000000..d0b41f9 --- /dev/null +++ b/u-boot/uboot-bash-completion @@ -0,0 +1,12 @@ +# bash uboot completion -*- shell-script -*- + +_uboot() +{ + local cur prev words cword + _init_completion || return + + COMPREPLY=( $( compgen -W "branches build flash clean" -- "$cur" ) ) +} && +complete -F _uboot uboot + +# ex: filetype=sh