aboutsummaryrefslogtreecommitdiff
path: root/survive_autocomplete.sh
blob: 0d56d4747cb119924350b4413c43a2a4fa23012b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/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