aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2020-01-02 17:26:50 +0100
committerGerd Hoffmann <kraxel@redhat.com>2020-01-02 17:26:50 +0100
commitebfcce6f11c328d97529aabedc06951f780e6445 (patch)
treecd9d0e44f21cd4e6078f837bf9a7d8e1cdc29d56
parent5d20463d9fe2b98db639f6c9c01480092390035e (diff)
downloaddrminfo-ebfcce6f11c328d97529aabedc06951f780e6445.tar.gz
better image matching
-rw-r--r--complete.c2
-rw-r--r--gtktest.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/complete.c b/complete.c
index 06efc0f..b1bc3d2 100644
--- a/complete.c
+++ b/complete.c
@@ -8,7 +8,7 @@
#define CASE_IMAGE \
" --image)\n" \
- " COMPREPLY=( $(compgen -f -- \"$cur\") )\n" \
+ " COMPREPLY=( $(compgen -f -o plusdirs -X '!*.@(jpg|jpeg|png)' -- \"$cur\") )\n" \
" ;;\n"
#define CASE_CARD \
diff --git a/gtktest.c b/gtktest.c
index 3b73c2c..0a39511 100644
--- a/gtktest.c
+++ b/gtktest.c
@@ -118,7 +118,7 @@ int main(int argc, char *argv[])
gtk_window_set_title(GTK_WINDOW(window), "gtktest");
if (ifile) {
- fprintf(stderr, "loading %s ...\n", argv[1]);
+ fprintf(stderr, "loading %s ...\n", ifile;
image = load_image(ifile);
}