-
Notifications
You must be signed in to change notification settings - Fork 761
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shells/ksh-devel: Fix ksh 1.0.5 Regression (issue #660)
From issue #660: Globs are not expanded with the following: % echo "/"{bin,sbin}"/*" /bin/* /sbin/* % v=/; echo "$v"bin"/*" /bin/* But globbing is unexpectedly performed if both parameter substitution and brace expansion are present: % v=/; echo "$v"{bin,sbin}"/*" [output omitted for the sake of brevity] Obtained from: ksh93/ksh#660
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
diff --git src/cmd/ksh93/sh/macro.c.orig src/cmd/ksh93/sh/macro.c | ||
index aba6f9d..0d60219 100644 | ||
--- src/cmd/ksh93/sh/macro.c.orig | ||
+++ src/cmd/ksh93/sh/macro.c | ||
@@ -2582,7 +2582,7 @@ static void endfield(Mac_t *mp,int split) | ||
mp->atmode = 0; | ||
if(mp->patfound) | ||
{ | ||
- int musttrim = mp->wasexpan && !mp->noextpat && strchr(argp->argval,'\\'); | ||
+ int musttrim = mp->wasexpan && !mp->quoted && !mp->noextpat && strchr(argp->argval,'\\'); | ||
sh.argaddr = 0; | ||
#if SHOPT_BRACEPAT | ||
/* in POSIX mode, disallow brace expansion for unquoted expansions */ |