diff options
author | cnlohr <lohr85@gmail.com> | 2018-06-23 14:17:42 -0400 |
---|---|---|
committer | cnlohr <lohr85@gmail.com> | 2018-06-23 14:17:42 -0400 |
commit | 5329e026dfb52f904965b687a717cc4c24f2cd8c (patch) | |
tree | a93f86d0f33ad91b4c34f975b55ae54415e8f6c1 | |
parent | cb06bbdba6cefc042f32985000f1ef03aafdb9a9 (diff) | |
download | libsurvive-5329e026dfb52f904965b687a717cc4c24f2cd8c.tar.gz libsurvive-5329e026dfb52f904965b687a717cc4c24f2cd8c.tar.bz2 |
Add autocomplete script.
-rwxr-xr-x | survive_autocomplete.sh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/survive_autocomplete.sh b/survive_autocomplete.sh new file mode 100755 index 0000000..0d56d47 --- /dev/null +++ b/survive_autocomplete.sh @@ -0,0 +1,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 |