aboutsummaryrefslogtreecommitdiffhomepage
path: root/expand.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 /expand.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 'expand.h')
-rw-r--r--expand.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/expand.h b/expand.h
index 14a4f477..fe13a145 100644
--- a/expand.h
+++ b/expand.h
@@ -60,7 +60,10 @@ enum
EXPAND_SKIP_HOME_DIRECTORIES = 1 << 9,
/** Allow fuzzy matching */
- EXPAND_FUZZY_MATCH = 1 << 10
+ EXPAND_FUZZY_MATCH = 1 << 10,
+
+ /** Requests that flag-like files not be sanitized. Sanitization means that a completion '--foo' that represents a file will be replaced by './--foo'. */
+ EXPAND_NO_SANITIZE_FLAGLIKE_FILES = 1 << 11
};
typedef int expand_flags_t;