--- a/scripts/bash_completion.pl Sun Aug 16 01:25:01 2015 +0200
+++ b/scripts/bash_completion.pl Sun Aug 16 01:40:44 2015 +0200
@@ -63,10 +63,11 @@
_sql_dk_bash_completion_formatter_property_choice() {
local property="${COMP_WORDS[COMP_CWORD-1]}";
- echo true;
- echo false;
- echo "TODO_$property";
- # TODO: find choices for the property
+ local formatter_dir='.$formatterPropertiesDir.'/$formatter
+ local property_choices_file=$formatter_dir/$property/choices;
+ if [ -f $property_choices_file ]; then
+ cat $property_choices_file;
+ fi
}
_sql_dk_bash_completion() {
@@ -110,6 +111,7 @@
esac;
if [ "x${COMP_WORDS[COMP_CWORD-2]}" == "x--formatter-property" ]; then
+ formatter=$( _sql_dk_bash_completion_find_formatter "${COMP_WORDS[@]}" );
COMPREPLY=( $( compgen -W "$(_sql_dk_bash_completion_formatter_property_choice )" -- $cur ) );
return 0;
fi