summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSARL ENR 68 <david@david.david>2015-09-15 21:27:17 +0200
committerSARL ENR 68 <david@david.david>2015-09-15 21:27:17 +0200
commit08f087b877610d284586177d60330f16fb5e33f9 (patch)
treefb85bff3dbfadc4ab6ba1f9234692cda52ae4aa5
parent867d1442e5e77073c486d6e0fbcb44e215d850a3 (diff)
downloadbm-08f087b877610d284586177d60330f16fb5e33f9.tar
bm-08f087b877610d284586177d60330f16fb5e33f9.tar.gz
bm-08f087b877610d284586177d60330f16fb5e33f9.tar.bz2
bm-08f087b877610d284586177d60330f16fb5e33f9.tar.xz
bm-08f087b877610d284586177d60330f16fb5e33f9.zip
Merge bash-completion file directly into bm source
-rw-r--r--bash-completion/bm45
1 files changed, 45 insertions, 0 deletions
diff --git a/bash-completion/bm b/bash-completion/bm
new file mode 100644
index 0000000..4047b4d
--- /dev/null
+++ b/bash-completion/bm
@@ -0,0 +1,45 @@
+# bm(1) completion
+# $Id: bm 397 2007-06-14 22:13:08Z guillomovitch $
+
+_bm()
+{
+ local cur prev
+
+ COMPREPLY=()
+ cur=${COMP_WORDS[COMP_CWORD]}
+ prev=${COMP_WORDS[COMP_CWORD-1]}
+
+ # --name=value style option
+ if [[ "$cur" == *=* ]]; then
+ prev=${cur/=*/}
+ cur=${cur/*=/}
+ case $prev in
+ --@(unpack-dir|move-@(srpm|rpm|log)|move-@(failed|succeeded)-srpm|copy-@(failed|succeeded)-srpm|move-failed-log|filter-@(renew|refresh)))
+ _filedir -d
+ return 0;
+ ;;
+ --build-log)
+ _filedir
+ return 0;
+ ;;
+ esac
+ fi
+
+
+ if [[ "$cur" == -* ]]; then
+ COMPREPLY=( $( compgen -W '--version -h --help -a -u -p -c -i \
+ -s -b -l -j -o --unpack-dir= --build-log= --move-srpm= \
+ --move-rpm= --move-failed-srpm= --copy-failed-srpm= \
+ --remove-failed-srpm --move-succeeded-srpm= \
+ --copy-succeeded-srpm= --remove-succeeded-srpm \
+ --move-log= --move-failed-log= --filter-renew= \
+ --filter-refresh= --clean --clean-on-success --ignore= \
+ --sign --nodeps --debug --short-circuit --with \
+ --without --define --target --dryrun --log=' -- $cur ) )
+ else
+ _filedir '@(spec|src.rpm)'
+ fi
+
+}
+complete -F _bm $filenames bm
+