Hi Guys This is a very simple patch that makes autocomplete much more usable for me. Let me know if it breaks anything.
Regards, Johann
>From d41b652781dc1b5e73647d85010da85517d0e61f Mon Sep 17 00:00:00 2001 From: klaasvakie <[email protected]> Date: Mon, 21 Sep 2009 22:32:00 +0200 Subject: [PATCH] Add a trailing "/" to dirs in dialog autocomplete This simple patch adds a trailing "/" to directory names when using autocomplete in the Run (%A) dialog. This makes the autocomplete behave more like bash, which is also what I am used to. This has the advantage that you don't have to guess what is a directory or not when completing. --- src/dialog.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/dialog.c b/src/dialog.c index f08fdf4..b72d053 100644 --- a/src/dialog.c +++ b/src/dialog.c @@ -263,6 +263,7 @@ ScanFiles(const char *dir, const char *prefix, unsigned acceptmask, unsigned dec WMFindInArray(result, (WMMatchDataProc *) strmatch, de->d_name + prefixlen) == WANotFound) { suffix = wstrdup(de->d_name + prefixlen); + if (sb.st_mode & S_IFDIR) wstrappend(suffix,"/"); WMAddToArray(result, suffix); } wfree(fullfilename); -- 1.6.0.3
