From 2e51c2b0248ea74d640905fbf81bcde44e1ce26b Mon Sep 17 00:00:00 2001 From: Amir Mohammad Saied Date: Fri, 23 Jan 2009 20:37:06 +0330 Subject: [PATCH] Add bash completion script Simple bash completion script for bti --- bti-bashcompletion | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 bti-bashcompletion diff --git a/bti-bashcompletion b/bti-bashcompletion new file mode 100644 index 0000000..fa155bc --- /dev/null +++ b/bti-bashcompletion @@ -0,0 +1,20 @@ +_bti() +{ + local cur prev + COMPREPLY=() + cur="${COMP_WORDS[COMP_CWORD]}" + prev="${COMP_WORDS[COMP_CWORD-1]}" + if [[ "${cur}" == -* ]] ; then + COMPREPLY=( $(compgen -W "-a -p -P -H -b -d -v -h --account \ + --password --proxy --host --bash --debug --version \ + --help" -- ${cur}) ) + fi + + if [[ "${prev}" == "--host" ]] ; then + COMPREPLY=( $(compgen -W "twitter identica" -- ${cur} ) ) + fi + + return 0 +} + +complete -F _bti bti -- 2.39.5