summaryrefslogtreecommitdiff
path: root/system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff
diff options
context:
space:
mode:
authorDaniel LEVAI <leva@ecentrum.hu>2012-11-19 14:26:37 -0600
committerRobby Workman <rworkman@slackbuilds.org>2012-11-19 16:52:08 -0600
commitf5e7485b6c8bfe3ea57ba4f5334fb963353e91d7 (patch)
treefde24af9290c0c090ef2af186340b63ba4161985 /system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff
parentfb80020f10a2063b7273ffe8e4d18a1caed70028 (diff)
downloadslackbuilds-f5e7485b6c8bfe3ea57ba4f5334fb963353e91d7.tar.gz
system/ksh-openbsd: Added (OpenBSD's pdksh ported to Linux)
Signed-off-by: Robby Workman <rworkman@slackbuilds.org>
Diffstat (limited to 'system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff')
-rw-r--r--system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff37
1 files changed, 37 insertions, 0 deletions
diff --git a/system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff b/system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff
new file mode 100644
index 0000000000..9326e8072d
--- /dev/null
+++ b/system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff
@@ -0,0 +1,37 @@
+From 5fc8a0ae3c807bd57c8e8d55531770914ea6670a Mon Sep 17 00:00:00 2001
+From: Alexander Polakov <polachok@gmail.com>
+Date: Mon, 20 Jun 2011 00:35:46 +0400
+Subject: [PATCH 8/8] Remove $ from the list of characters blocking *
+ addition.
+
+This allows things like $HOME/bi<tab> complete to /home/username/bin.
+---
+ edit.c | 8 ++++----
+ 1 files changed, 4 insertions(+), 4 deletions(-)
+
+diff --git edit.c edit.c
+index 01c2fe6..2702dab 100644
+--- edit.c
++++ edit.c
+@@ -627,14 +627,14 @@ add_glob(const char *str, int slen)
+
+ /*
+ * If the pathname contains a wildcard (an unquoted '*',
+- * '?', or '[') or parameter expansion ('$'), or a ~username
+- * with no trailing slash, then it is globbed based on that
+- * value (i.e., without the appended '*').
++ * '?', or '[') or a ~username with no trailing slash,
++ * then it is globbed based on that value (i.e., without
++ * the appended '*').
+ */
+ 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 (*s == '/')
+--
+1.7.5
+