2011-11-01 22:14:45 +02:00
|
|
|
# BitKeeper completion -*- shell-script -*-
|
|
|
|
# adapted from code by Bart Trojanowski <bart@jukie.net>
|
2002-06-12 19:58:27 +00:00
|
|
|
|
2011-04-04 22:14:39 +03:00
|
|
|
_bk()
|
|
|
|
{
|
2011-04-20 14:22:23 +03:00
|
|
|
local cur prev words cword
|
|
|
|
_init_completion || return
|
2002-06-12 19:58:27 +00:00
|
|
|
|
add_members, bk, gcc, mtx, munin-run, munindoc, mutt, p4, portinstall, postmap, ri, ypmatch: Avoid stderr spewage when needed commands/dirs are not available.
2011-10-22 11:48:23 +03:00
|
|
|
local BKCMDS="$( bk help topics 2>/dev/null | \
|
|
|
|
awk '/^ bk/ { print $4 }' | 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
|
|
|
|
2009-10-04 19:42:50 +02:00
|
|
|
# ex: ts=4 sw=4 et filetype=sh
|