summaryrefslogtreecommitdiff
path: root/system/ksh-openbsd/patches/07-Remove-from-the-list-of-characters-blocking-addition.diff
blob: 9326e8072dcf16f9339d142c9acb003599a85e55 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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