2002-06-12 19:58:27 +00:00
|
|
|
# BitKeeper completion adapted from code by Bart Trojanowski <bart@jukie.net>
|
|
|
|
|
2009-06-08 21:22:43 +03:00
|
|
|
have bk &&
|
2002-06-12 19:58:27 +00:00
|
|
|
_bk() {
|
2009-10-19 21:24:25 +03:00
|
|
|
local BKCMDS
|
2002-06-12 19:58:27 +00:00
|
|
|
|
2009-10-19 21:24:25 +03:00
|
|
|
COMPREPLY=()
|
2010-02-08 17:25:08 +01:00
|
|
|
_get_comp_words_by_ref cur
|
2002-06-12 19:58:27 +00:00
|
|
|
|
2009-12-21 23:00:31 +02:00
|
|
|
BKCMDS="$( bk help topics | awk '/^ bk/ { print $4 }' | \
|
2009-12-21 00:09:02 +02:00
|
|
|
xargs printf '%s ' )"
|
2002-06-12 19:58:27 +00:00
|
|
|
|
2009-10-19 21:24:25 +03:00
|
|
|
COMPREPLY=( $( compgen -W "$BKCMDS" -- "$cur" ) )
|
|
|
|
_filedir
|
2002-06-12 19:58:27 +00:00
|
|
|
|
2009-10-19 21:24:25 +03:00
|
|
|
return 0
|
2009-06-08 21:22:43 +03:00
|
|
|
} &&
|
2002-06-12 19:58:27 +00:00
|
|
|
complete -F _bk bk
|
2009-10-01 20:54:51 +03:00
|
|
|
|
|
|
|
# Local variables:
|
|
|
|
# mode: shell-script
|
2009-10-04 19:42:50 +02:00
|
|
|
# sh-basic-offset: 4
|
2009-10-01 20:54:51 +03:00
|
|
|
# sh-indent-comment: t
|
2009-10-04 19:42:50 +02:00
|
|
|
# indent-tabs-mode: nil
|
2009-10-01 20:54:51 +03:00
|
|
|
# End:
|
2009-10-04 19:42:50 +02:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|