aboutsummaryrefslogtreecommitdiff
path: root/survive_autocomplete.sh
blob: 560eb33e53427e6f434c94f6e02d6e5717c9d466 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/bin/bash

#place this script in /etc/bash_completion.d/ for general use.
_script()
{
	_script_commands=$(./test -m $1 $2 $3)
	local cur prev
	COMPREPLY=()
	cur="${COMP_WORDS[COMP_CWORD]}"
	COMPREPLY=( $(compgen -W "${_script_commands}" -- ${cur}) )
	return 0
}

complete -o nospace -F _script ./calibrate
complete -o nospace -F _script ./simple_pose_test
complete -o nospace -F _script ./data_recorder