aboutsummaryrefslogtreecommitdiffhomepage
path: root/wildcard.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-09-24 22:01:33 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-09-24 22:06:43 -0700
commit316d7004a3d4f6905f36301b6d5c9ebd934f11fa (patch)
treef631fe6cd81f6d07ca755f812c73c6b3923e4d02 /wildcard.h
parent1096b1acd508aa9752d4fb6b8286b2b61cd8df1a (diff)
Prepend ./ to "flag-like file" wildcard expansions and completions
If a wildcard or completion expands to a file that begins with one or more dashes, prepend a ./ to it so that it doesn't get parsed as an option. Fixes #1519
Diffstat (limited to 'wildcard.h')
-rw-r--r--wildcard.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/wildcard.h b/wildcard.h
index 8c542221..b09aa64f 100644
--- a/wildcard.h
+++ b/wildcard.h
@@ -84,7 +84,9 @@ bool wildcard_has(const wcstring &, bool internal);
bool wildcard_has(const wchar_t *, bool internal);
/**
- Test wildcard completion
+ Matches the string against the wildcard, and if the wildcard is a
+ possible completion of the string, the remainder of the string is
+ inserted into the out vector.
*/
bool wildcard_complete(const wcstring &str,
const wchar_t *wc,