aboutsummaryrefslogtreecommitdiff
path: root/vis-cmds.c
diff options
context:
space:
mode:
Diffstat (limited to 'vis-cmds.c')
-rw-r--r--vis-cmds.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vis-cmds.c b/vis-cmds.c
index e58d20a..5b49913 100644
--- a/vis-cmds.c
+++ b/vis-cmds.c
@@ -251,7 +251,11 @@ static bool is_file_pattern(const char *pattern) {
struct stat meta;
if (stat(pattern, &meta) == 0 && S_ISDIR(meta.st_mode))
return true;
- return strchr(pattern, '*') || strchr(pattern, '[') || strchr(pattern, '{');
+ for (char special[] = "*?[{$~", *s = special; *s; s++) {
+ if (strchr(pattern, *s))
+ return true;
+ }
+ return false;
}
static const char *file_open_dialog(Vis *vis, const char *pattern) {