summaryrefslogtreecommitdiffstats
path: root/system/ksh-openbsd/patches/08-Remove-from-the-list-of-characters-blocking-addition.diff
diff options
context:
space:
mode:
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
+