diff options
author | David E. O'Brien <obrien@FreeBSD.org> | 2012-06-05 01:59:27 +0000 |
---|---|---|
committer | David E. O'Brien <obrien@FreeBSD.org> | 2012-06-05 01:59:27 +0000 |
commit | aa4e597344d574f12cc3fcc4206a232cd1948c0b (patch) | |
tree | 0086d7774cb9d9d930cca70046750ef70a0382ba /shells | |
parent | 59a9476e9401f85a0cb34ca87c3a0aaee3687a0d (diff) |
Fix bug for add_glob:
Do not stop scanning if we see '$' as it does more harm than good.
For $HOME/tm we should return $HOME/tm*
Set license to BSD (not "public domain" due to sigact.[ch]).
Submitted by: Simon Gerraty <sjg@juniper.net>
Obtained from: NetBSD
Approved by: skreuzer
Notes
Notes:
svn path=/head/; revision=298403
Diffstat (limited to 'shells')
-rw-r--r-- | shells/pdksh/Makefile | 3 | ||||
-rw-r--r-- | shells/pdksh/files/patch-edit.c | 9 |
2 files changed, 11 insertions, 1 deletions
diff --git a/shells/pdksh/Makefile b/shells/pdksh/Makefile index ad8dea47737a..71b513d0da00 100644 --- a/shells/pdksh/Makefile +++ b/shells/pdksh/Makefile @@ -7,7 +7,7 @@ PORTNAME= pdksh PORTVERSION= 5.2.14p2 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= shells MASTER_SITES= http://gd.tuwien.ac.at/utils/shells/pdksh/ \ ftp://ftp.lip6.fr/pub/unix/shells/pdksh/ \ @@ -20,6 +20,7 @@ PATCH_DIST_STRIP= -p2 MAINTAINER= skreuzer@FreeBSD.org COMMENT= The Public Domain Korn Shell +LICENSE= BSD GNU_CONFIGURE= yes MAN1= ksh.1 diff --git a/shells/pdksh/files/patch-edit.c b/shells/pdksh/files/patch-edit.c index e4f7b6ecbcc7..b79060e68254 100644 --- a/shells/pdksh/files/patch-edit.c +++ b/shells/pdksh/files/patch-edit.c @@ -8,3 +8,12 @@ cp += 2; } +@@ -847,7 +847,7 @@ add_glob(str, slen) + for (s = toglob; *s; s++) { + if (*s == '\\' && s[1]) + s++; +- else if (*s == '*' || *s == '[' || *s == '?' || *s == '$' ++ else if (*s == '*' || *s == '[' || *s == '?' + || (s[1] == '(' /*)*/ && strchr("*+?@!", *s))) + break; + else if (ISDIRSEP(*s)) |