/etc/bash_completion.d/bjavaloader is in barry-util 0.18.5-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | # -*- mode: shell-script; sh-basic-offset: 8; indent-tabs-mode: t -*-
# ex: ts=8 sw=8 noet filetype=sh
#
# bjavaloader(1) completion by Ryan Li <ryan@ryanium.com>
have bjavaloader &&
_bjavaloader()
{
local cur prev
local cmd
declare -i cmd
COMREPLY=()
cur=`_get_cword`
prev=${COMP_WORDS[COMP_CWORD-1]}
cmd=0
for (( i = 0; i < COMP_CWORD; ++i )); do
case ${COMP_WORDS[$i]} in
@(dir|deviceinfo|load|wipe|save|erase| \
eventlog|cleareventlog|logstacktraces|screenshot|settime))
cmd=1
;;
esac
done
if [[ "$cur" == -* ]]; then
if [[ $cmd -eq 0 ]]; then
COMPREPLY=( $( compgen -W '-h -p -P -v' -- "$cur" ) )
else
case "$prev" in
dir)
COMPREPLY=( $( compgen -W '-s' -- "$cur" ) )
return 0
;;
wipe)
COMPREPLY=( $( compgen -W '-a -i' -- "$cur" ) )
return 0
;;
erase)
COMPREPLY=( $( compgen -W '-f' -- "$cur" ) )
return 0
;;
*)
;;
esac
fi
elif [[ $cmd -eq 0 ]]; then
COMPREPLY=( $( compgen -W 'dir deviceinfo \
load wipe save erase eventlog cleareventlog \
logstacktraces screenshot settime' -- "$cur" ) )
fi
case "$prev" in
-p)
COMPREPLY=( $( compgen -W \
'$( bidentify 2>&- | sed -e "s/,.*$//" )' \
-- "$cur" ) )
return 0
;;
load)
_filedir cod
return 0
;;
screenshot)
_filedir bmp
return 0
;;
*)
;;
esac
} &&
complete -F _bjavaloader bjavaloader
|