Add bash completion script
authorAmir Mohammad Saied <amirsaied@gmail.com>
Fri, 23 Jan 2009 17:07:06 +0000 (20:37 +0330)
committerGreg Kroah-Hartman <gregkh@suse.de>
Fri, 23 Jan 2009 20:30:01 +0000 (12:30 -0800)
Simple bash completion script for bti

bti-bashcompletion [new file with mode: 0644]

diff --git a/bti-bashcompletion b/bti-bashcompletion
new file mode 100644 (file)
index 0000000..fa155bc
--- /dev/null
@@ -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