diff options
-rw-r--r-- | xe.1 | 4 | ||||
-rw-r--r-- | xe.c | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/xe.1 b/xe.1 index a7769eb..9661c73 100644 --- a/xe.1 +++ b/xe.1 @@ -139,7 +139,9 @@ is regarded as a pattern, see .Sx PERCENT RULES below. -Patterns without a slash are matched against the basenames only. +Patterns without a slash (or +.Sq Li \&*\&* ) +are matched against the basenames only. .Pp Multiple runs of patterns and commands are separated by .Sq Li \&+ . diff --git a/xe.c b/xe.c index 7e75a57..000c0b3 100644 --- a/xe.c +++ b/xe.c @@ -493,7 +493,7 @@ perc(char *pat, char *str, int lvl) int perc_match(char *pat, char *arg) { - if (!strchr(pat, '/')) { + if (!strchr(pat, '/') && !strstr(pat, "**")) { char *d = strrchr(arg, '/'); if (d) arg = d + 1; @@ -515,7 +515,7 @@ perc_subst(char *pat, char *base, char *arg) if (strcmp(arg, replace) == 0) return base; - if (!strchr(pat, '/')) { + if (!strchr(pat, '/') && !strstr(pat, "**")) { char *d = strrchr(base, '/'); if (d) base = d + 1; |