27 lines
512 B
Plaintext
Raw Normal View History

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=()
_get_comp_words_by_ref cur
2002-06-12 19:58:27 +00: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
# Local variables:
# mode: shell-script
2009-10-04 19:42:50 +02:00
# sh-basic-offset: 4
# sh-indent-comment: t
2009-10-04 19:42:50 +02:00
# indent-tabs-mode: nil
# End:
2009-10-04 19:42:50 +02:00
# ex: ts=4 sw=4 et filetype=sh