[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] glob_char_p: include extglob group chars
From: |
Grisha Levit |
Subject: |
[PATCH] glob_char_p: include extglob group chars |
Date: |
Tue, 26 Sep 2023 02:01:13 -0400 |
This was an oversight when changing quote_string_for_globbing to
only quote chars when they need it.
---
pathexp.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/pathexp.c b/pathexp.c
index a849ec76..2eed8310 100644
--- a/pathexp.c
+++ b/pathexp.c
@@ -175,6 +175,14 @@ glob_char_p (const char *s)
{
switch (*s)
{
+#if defined (EXTENDED_GLOB)
+ case '+':
+ case '@':
+ return (s[1] == '('); /*)*/
+ case '(':
+ case '|':
+ case ')':
+#endif
case '!':
case '^':
case '-':
@@ -187,11 +195,6 @@ glob_char_p (const char *s)
case '?':
case '\\':
return 1;
- case '+':
- case '@':
- if (s[1] == '(') /*(*/
- return 1;
- break;
}
return 0;
}
--
2.42.0
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH] glob_char_p: include extglob group chars,
Grisha Levit <=