# bash completion for geeqie -*- shell-script -*-
+file_types='@(3fr|ani|arw|avif|bmp|cr2|cr3|crw|cur|dds|djvu|dng|erf|gif|heic|heif|ico|jp2|jpe[g]||jpegxl|jps|kdc|mef|mos|mpo|mrw|nef|orf|pbm|pdf|pgm|pnm|ppm|pef|png|psd|qif|qtif|raf|raw|rw2|scr|sr2|srf|svg[z]|tga|targa|tif[f]|webp|xbm|xpm|gqv|xml|xmp)'
+
_geeqie()
{
- local cur
- _init_completion -s || return
+ local cur prev
+ _init_completion -s || return
+
+ case $prev in
+ :)
+ case ${COMP_WORDS[1]} in
+ --cache-render | --cache-render-recurse | --cache-render-shared-recurse | --get-filelist | --get-filelist-recurse | --slideshow-recurse)
+ compopt -o nospace
+ _filedir -d
+ return
+ ;;
+ --config-load)
+ compopt -o nospace
+ _filedir xml
+ return
+ ;;
+ --file | --File | --get-destination | --get-sidecars | --list-add | --selection-add | --selection-remove | --view)
+ compopt -o nospace
+ _filedir $file_types
+ return
+ ;;
+ --get-collection)
+ compopt -o nospace
+ _filedir gqv
+ return
+ ;;
+ --lua)
+ compopt -o nospace
+ _filedir lua
+ return
+ ;;
+ esac
+ ;;
+ --cache-maintenance)
+ _filedir -d
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]
+ then
+ COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
+ [[ ${COMPREPLY-} == *[=:] ]] && compopt -o nospace
+ return
+ fi
- if [[ $cur == -* ]]
- then
- COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur"))
- [[ ${COMPREPLY-} == *= ]] && compopt -o nospace
- return
- fi
+_filedir $file_types
} &&
complete -F _geeqie geeqie
<refmeta>
<refentrytitle>GEEQIE</refentrytitle>
<manvolnum>1</manvolnum>
-<refmiscinfo class='source'>March 2024</refmiscinfo>
-<refmiscinfo class='manual'>Geeqie 2.4 GTK3</refmiscinfo>
+<refmiscinfo class='source'>April 2024</refmiscinfo>
+<refmiscinfo class='manual'>Geeqie 2.4+git20240402-d802d5f5 GTK3</refmiscinfo>
</refmeta>
<refnamediv>
<refname>Geeqie</refname>
<para>Generated for version:</para>
-<para>Geeqie 2.4</para>
+<para>Geeqie 2.4+git20240402-d802d5f5</para>
<refsect2 id='valid_options'><title>Valid options:</title>
<variablelist remap='TP'>
</listitem>
</varlistentry>
<varlistentry>
- <term>+t, <emphasis role='strong' remap='B'>--with-tools</emphasis></term>
+ <term><emphasis role='strong' remap='B'>-T</emphasis>, <emphasis role='strong' remap='B'>--with-tools</emphasis></term>
<listitem>
<para>force show of tools</para>
</listitem>
</listitem>
</varlistentry>
<varlistentry>
- <term>+w, <emphasis role='strong' remap='B'>--show-log-window</emphasis></term>
+ <term><emphasis role='strong' remap='B'>-w</emphasis>, <emphasis role='strong' remap='B'>--show-log-window</emphasis></term>
<listitem>
<para>show log window</para>
</listitem>
</listitem>
</varlistentry>
<varlistentry>
- <term><emphasis role='strong' remap='B'>-cs</emphasis>: <emphasis role='strong' remap='B'>--cache-shared</emphasis>:clear|clean</term>
+ <term><emphasis role='strong' remap='B'>-cs</emphasis>: <emphasis role='strong' remap='B'>--cache-shared</emphasis>:clean|clear</term>
<listitem>
-<para>clear or clean shared thumbnail cache</para>
+<para>clean or clear shared thumbnail cache</para>
</listitem>
</varlistentry>
<varlistentry>
- <term><emphasis role='strong' remap='B'>-ct</emphasis>: <emphasis role='strong' remap='B'>--cache-thumbs</emphasis>:clear|clean</term>
+ <term><emphasis role='strong' remap='B'>-ct</emphasis>: <emphasis role='strong' remap='B'>--cache-thumbs</emphasis>:clean|clear</term>
<listitem>
-<para>clear or clean thumbnail cache</para>
+<para>clean or clear thumbnail cache</para>
</listitem>
</varlistentry>
<varlistentry>
</listitem>
</varlistentry>
<varlistentry>
- <term>+t <emphasis role='strong' remap='B'>--tools-show</emphasis></term>
+ <term><emphasis role='strong' remap='B'>-T</emphasis> <emphasis role='strong' remap='B'>--tools-show</emphasis></term>
<listitem>
<para>show tools</para>
</listitem>
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.49.3.
-.TH GEEQIE "1" "March 2024" "Geeqie 2.4 GTK3" "User Commands"
+.TH GEEQIE "1" "April 2024" "Geeqie 2.4+git20240402-d802d5f5 GTK3" "User Commands"
.SH NAME
Geeqie - GTK based multiformat image viewer
.SH SYNOPSIS
Generated for version:
.PP
-Geeqie 2.4
+Geeqie 2.4+git20240402\-d802d5f5
.SS "Valid options:"
.TP
\fB\-\-blank\fR
\fB\-s\fR, \fB\-\-slideshow\fR
start in slideshow mode
.TP
-+t, \fB\-\-with\-tools\fR
+\fB\-T\fR, \fB\-\-with\-tools\fR
force show of tools
.TP
\fB\-t\fR, \fB\-\-without\-tools\fR
\fB\-v\fR, \fB\-\-version\fR
print version info
.TP
-+w, \fB\-\-show\-log\-window\fR
+\fB\-w\fR, \fB\-\-show\-log\-window\fR
show log window
.TP
\fB\-\-debug\fR[=\fI\,level\/\fR]
\fB\-crsr\fR: \fB\-\-cache\-render\-shared\-recurse\fR:<folder>
render thumbnails recursively (see Help)
.TP
-\fB\-cs\fR: \fB\-\-cache\-shared\fR:clear|clean
-clear or clean shared thumbnail cache
+\fB\-cs\fR: \fB\-\-cache\-shared\fR:clean|clear
+clean or clear shared thumbnail cache
.TP
-\fB\-ct\fR: \fB\-\-cache\-thumbs\fR:clear|clean
-clear or clean thumbnail cache
+\fB\-ct\fR: \fB\-\-cache\-thumbs\fR:clean|clear
+clean or clear thumbnail cache
.TP
\fB\-d\fR \fB\-\-delay=\fR<[H:][M:][N][.M]>
set slide show delay to Hrs Mins N.M seconds
\fB\-\-tell\fR
print filename [and Collection] of current image
.TP
-+t \fB\-\-tools\-show\fR
+\fB\-T\fR \fB\-\-tools\-show\fR
show tools
.TP
\fB\-t\fR \fB\-\-tools\-hide\fR
{
/* do nothing but do not produce warnings */
}
- else if (strcmp(cmd_line, "+t") == 0 ||
+ else if (strcmp(cmd_line, "-T") == 0 ||
strcmp(cmd_line, "--with-tools") == 0)
{
command_line->tools_show = TRUE;
- remote_list = g_list_append(remote_list, g_strdup("+t"));
+ remote_list = g_list_append(remote_list, g_strdup("-T"));
}
else if (strcmp(cmd_line, "-t") == 0 ||
strcmp(cmd_line, "--without-tools") == 0)
remote_list = remote_build_list(remote_list, argc - i, &argv[i], &remote_errors);
}
}
- else if ((strcmp(cmd_line, "+w") == 0) ||
+ else if ((strcmp(cmd_line, "-w") == 0) ||
strcmp(cmd_line, "--show-log-window") == 0)
{
command_line->log_window_show = TRUE;
print_term(FALSE, _(" -r, --remote send following commands to open window\n"));
print_term(FALSE, _(" -rh, --remote-help print remote command list\n"));
print_term(FALSE, _(" -s, --slideshow start in slideshow mode\n"));
- print_term(FALSE, _(" +t, --with-tools force show of tools\n"));
+ print_term(FALSE, _(" -T, --with-tools force show of tools\n"));
print_term(FALSE, _(" -t, --without-tools force hide of tools\n"));
print_term(FALSE, _(" -v, --version print version info\n"));
- print_term(FALSE, _(" +w, --show-log-window show log window\n"));
+ print_term(FALSE, _(" -w, --show-log-window show log window\n"));
#ifdef DEBUG
print_term(FALSE, _(" --debug[=level] turn on debug output\n"));
print_term(FALSE, _(" -g:, --grep:<regexp> filter debug output\n"));
}
else if (!remote_do)
{
- command_line_errors = g_string_append(command_line_errors, cmd_line);
- command_line_errors = g_string_append(command_line_errors, "\n");
+ g_string_append_printf(command_line_errors, is_remote_command(cmd_line) ? _("%s\n\nThis is a --remote command option\n") : _("%s\n\nThis option is unknown\n"), cmd_line);
}
g_free(cmd_all);
{ "-crr:", "--cache-render-recurse:", gr_cache_render_recurse, TRUE, FALSE, N_("<folder> "), N_("render thumbnails recursively") },
{ "-crs:", "--cache-render-shared:", gr_cache_render_standard, TRUE, FALSE, N_("<folder> "), N_(" render thumbnails (see Help)") },
{ "-crsr:", "--cache-render-shared-recurse:", gr_cache_render_standard_recurse, TRUE, FALSE, N_("<folder>"), N_(" render thumbnails recursively (see Help)") },
- { "-cs:", "--cache-shared:", gr_cache_shared, TRUE, FALSE, N_("clear|clean"), N_("clear or clean shared thumbnail cache") },
- { "-ct:", "--cache-thumbs:", gr_cache_thumb, TRUE, FALSE, N_("clear|clean"), N_("clear or clean thumbnail cache") },
+ { "-cs:", "--cache-shared:", gr_cache_shared, TRUE, FALSE, N_("clean|clear"), N_("clean or clear shared thumbnail cache") },
+ { "-ct:", "--cache-thumbs:", gr_cache_thumb, TRUE, FALSE, N_("clean|clear"), N_("clean or clear thumbnail cache") },
{ "-d", "--delay=", gr_slideshow_delay, TRUE, FALSE, N_("<[H:][M:][N][.M]>"), N_("set slide show delay to Hrs Mins N.M seconds") },
{ nullptr, "--first", gr_image_first, FALSE, FALSE, nullptr, N_("first image") },
{ "-f", "--fullscreen", gr_fullscreen_toggle, FALSE, TRUE, nullptr, N_("toggle full screen") },
{ "-ss","--slideshow-start", gr_slideshow_start, FALSE, FALSE, nullptr, N_("start slide show") },
{ "-sS","--slideshow-stop", gr_slideshow_stop, FALSE, FALSE, nullptr, N_("stop slide show") },
{ nullptr, "--tell", gr_file_tell, FALSE, FALSE, nullptr, N_("print filename [and Collection] of current image") },
- { "+t", "--tools-show", gr_tools_show, FALSE, TRUE, nullptr, N_("show tools") },
+ { "-T", "--tools-show", gr_tools_show, FALSE, TRUE, nullptr, N_("show tools") },
{ "-t", "--tools-hide", gr_tools_hide, FALSE, TRUE, nullptr, N_("hide tools") },
{ nullptr, "--view:", gr_file_view, TRUE, FALSE, N_("<FILE>"), N_("open FILE in new window") },
{ nullptr, "view:", gr_file_view, TRUE, FALSE, N_("<FILE>"), N_("open FILE in new window") },
return nullptr;
}
+gboolean is_remote_command(const gchar *text)
+{
+ RemoteCommandEntry *entry = nullptr;
+
+ entry = remote_command_find(text, nullptr);
+
+ return entry ? TRUE : FALSE;
+}
+
static void remote_cb(RemoteConnection *, const gchar *text, GIOChannel *channel, gpointer data)
{
RemoteCommandEntry *entry;
RemoteConnection *remote_server_init(gchar *path, CollectionData *command_collection);
gboolean remote_server_exists(const gchar *path);
-
+gboolean is_remote_command(const gchar *text);
#endif
/* vim: set shiftwidth=8 softtabstop=0 cindent cinoptions={1s: */