
# This file is part of jscribble.
#
# jscribble is free software: you can redistribute it and/or modify it under
# the terms of the GNU General Public License as published by the Free Software
# Foundation, either version 2 of the License, or (at your option) any later
# version.
#
# jscribble is distributed in the hope that it will be useful, but WITHOUT ANY
# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License along with
# jscribble.  If not, see <http://www.gnu.org/licenses/>.

_jscribble() {
	local cur prev
	COMPREPLY=()
	_get_comp_words_by_ref cur prev

	case "$cur" in
		*)
			COMPREPLY=( $(compgen -W '-v' -- $cur) \
				$(compgen -W '
 --date_format --help_screen_background_color --help_screen_border_radius --help_screen_close_key --help_screen_margin --help_screen_padding --help_screen_spacing --help_screen_toggle_key --help_screen_vspacing --help_splash_background_color --help_splash_border_radius --help_splash_enable --help_splash_height --help_splash_margin --memory_usage_position_bottom --memory_usage_position_left --memory_usage_show --notebook_auto_compress --notebook_background_color --notebook_cache_width --notebook_close_key --notebook_default_height --notebook_default_width --notebook_draw_mouse_button --notebook_draw_stroke_width --notebook_erase_enable --notebook_erase_mouse_button --notebook_erase_stroke_width --notebook_erase_timeout --notebook_foreground_color --notebook_go_back_key --notebook_go_back_mouse_button --notebook_go_forward_key --notebook_go_forward_mouse_button --notebook_goto_first_key --notebook_goto_last_key --notebook_name_validation_pattern --notebook_selection_window_height --notebook_selection_window_width --onion_info_position_left --onion_info_position_top --onion_layer_decrease_key --onion_layer_increase_key --onion_mode_opacity --page_number_position_top --program_name --ruling_graph_toggle_key --ruling_line_color --ruling_line_spacing --ruling_toggle_key --scroll_panel_color --scroll_panel_padding --scroll_panel_width --scroll_panels_show --user_config_filename				' -- $cur)
			)
			;;
	esac

	if (( COMP_CWORD > 0 ))
	then
		case "$prev" in
			--help_splash_enable|--memory_usage_show|--notebook_auto_compress|--notebook_erase_enable|--scroll_panels_show)
				COMPREPLY=( $(compgen -W 'true false' -- $cur) )
				;;
		esac
	fi

	return 0
}

complete -F _jscribble jscribble

# vim: ft=sh
