--- /dev/null
+#!/bin/bash
+
+_geeqie()
+{
+ local cur
+ _init_completion -s || return
+
+ if [[ $cur == -* ]]
+ then
+ # shellcheck disable=SC2207
+ # shellcheck disable=SC2016
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
+ return
+ fi
+
+} &&
+ complete -F _geeqie geeqie
+
+# ex: filetype=sh
--- /dev/null
+# This file is a part of Geeqie project (https://www.geeqie.org/).
+# Copyright (C) 2008 - 2024 The Geeqie Team
+#
+# This program 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.
+#
+# This program 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
+#
+
+install_data('geeqie', install_dir : completionsdir)
# [gq_]htmldir /usr/local/share/doc/geeqie/html * help files
# gq_localedir /usr/locale/share/locale
# mandir1 /usr/local/share/man/man1 man page
+# completionsdir /usr/local/share/bash-completion/completions bash command line completions
# podir project_root/po
# * See meson_options.txt file
htmldir = join_paths(prefix, gq_htmldir)
icondir = join_paths(datadir, 'pixmaps')
mandir1 = join_paths(datadir, 'man', 'man1')
-
+completionsdir = join_paths(datadir, 'bash-completion', 'completions')
podir = join_paths(meson.project_source_root(), 'po')
scriptsdir = join_paths(meson.project_source_root(), 'scripts')
# Generate the help files
subdir('doc')
+# Generate the command line auto-complete file
+subdir('auto-complete')
+
# Install other project files
if running_from_git
cmd = [find_program('gen_changelog.sh'), meson.current_source_dir(), meson.current_build_dir()]