Link Here
|
1 |
--- bashline.c.orig 2009-01-08 06:29:24.000000000 -0800 |
1 |
--- bashline.c.orig 2014-03-02 13:26:23.000000000 -0500 |
2 |
+++ bashline.c 2012-07-30 15:07:10.000000000 -0500 |
2 |
+++ bashline.c 2014-03-02 13:30:09.000000000 -0500 |
3 |
@@ -235,6 +235,11 @@ int bash_readline_initialized = 0; |
3 |
@@ -255,6 +255,11 @@ |
4 |
host list. */ |
4 |
host list. */ |
5 |
int perform_hostname_completion = 1; |
5 |
int perform_hostname_completion = 1; |
6 |
|
6 |
|
Link Here
|
12 |
/* If non-zero, we don't do command completion on an empty line. */ |
12 |
/* If non-zero, we don't do command completion on an empty line. */ |
13 |
int no_empty_command_completion; |
13 |
int no_empty_command_completion; |
14 |
|
14 |
|
15 |
@@ -252,7 +257,8 @@ int dircomplete_expand_relpath = 0; |
15 |
@@ -284,7 +289,8 @@ |
16 |
|
16 |
|
17 |
static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:"; |
17 |
static char *bash_completer_word_break_characters = " \t\n\"'@><=;|&(:"; |
18 |
static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:"; |
18 |
static char *bash_nohostname_word_break_characters = " \t\n\"'><=;|&(:"; |
Link Here
|
22 |
|
22 |
|
23 |
static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/ |
23 |
static const char *default_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!:{~"; /*}*/ |
24 |
static char *custom_filename_quote_characters = 0; |
24 |
static char *custom_filename_quote_characters = 0; |
25 |
@@ -370,6 +376,80 @@ enable_hostname_completion (on_or_off) |
25 |
@@ -403,6 +409,80 @@ |
26 |
return (old_value); |
26 |
return (old_value); |
27 |
} |
27 |
} |
28 |
|
28 |
|
Link Here
|
45 |
+ else |
45 |
+ else |
46 |
+ { |
46 |
+ { |
47 |
+ colon_is_wordbreak = 0; |
47 |
+ colon_is_wordbreak = 0; |
48 |
+ rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!{~"; /*}*/ |
48 |
+ rl_filename_quote_characters = " \t\n\\\"'@<>=;|&()#$`?*[!{~"; /*}*/ |
49 |
+ } |
49 |
+ } |
50 |
+ |
50 |
+ |
51 |
+ /* Now we need to figure out how to appropriately modify and assign |
51 |
+ /* Now we need to figure out how to appropriately modify and assign |
Link Here
|
57 |
+ allocate new memory for rl_completer_word_break_characters. */ |
57 |
+ allocate new memory for rl_completer_word_break_characters. */ |
58 |
+ |
58 |
+ |
59 |
+ if (bash_readline_initialized == 0 && |
59 |
+ if (bash_readline_initialized == 0 && |
60 |
+ (rl_completer_word_break_characters == 0 || |
60 |
+ (rl_completer_word_break_characters == 0 || |
61 |
+ rl_completer_word_break_characters == rl_basic_word_break_characters)) |
61 |
+ rl_completer_word_break_characters == rl_basic_word_break_characters)) |
62 |
+ { |
62 |
+ { |
63 |
+ if (on_or_off) |
63 |
+ if (on_or_off) |
64 |
+ rl_completer_word_break_characters = savestring (bash_completer_word_break_characters); |
64 |
+ rl_completer_word_break_characters = savestring (bash_completer_word_break_characters); |
65 |
+ else |
65 |
+ else |
66 |
+ rl_completer_word_break_characters = savestring (bash_nocolon_word_break_characters); |
66 |
+ rl_completer_word_break_characters = savestring (bash_nocolon_word_break_characters); |
67 |
+ } |
67 |
+ } |
68 |
+ else |
68 |
+ else |
69 |
+ { |
69 |
+ { |
Link Here
|
76 |
+ nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off); |
76 |
+ nval = (char *)xmalloc (strlen (rl_completer_word_break_characters) + 1 + on_or_off); |
77 |
+ |
77 |
+ |
78 |
+ if (on_or_off == 0) |
78 |
+ if (on_or_off == 0) |
79 |
+ { |
79 |
+ { |
80 |
+ /* Turn it off -- just remove `:' from word break chars. We want |
80 |
+ /* Turn it off -- just remove `:' from word break chars. We want |
81 |
+ to remove all occurrences of `:' from the char list, so we loop |
81 |
+ to remove all occurrences of `:' from the char list, so we loop |
82 |
+ rather than just copy the rest of the list over AT. */ |
82 |
+ rather than just copy the rest of the list over AT. */ |
83 |
+ for (nv = nval, at = rl_completer_word_break_characters; *at; ) |
83 |
+ for (nv = nval, at = rl_completer_word_break_characters; *at; ) |
84 |
+ if (*at != ':') |
84 |
+ if (*at != ':') |
85 |
+ *nv++ = *at++; |
85 |
+ *nv++ = *at++; |
86 |
+ else |
86 |
+ else |
87 |
+ at++; |
87 |
+ at++; |
88 |
+ *nv = '\0'; |
88 |
+ *nv = '\0'; |
89 |
+ } |
89 |
+ } |
90 |
+ else |
90 |
+ else |
91 |
+ { |
91 |
+ { |
92 |
+ nval[0] = ':'; |
92 |
+ nval[0] = ':'; |
93 |
+ strcpy (nval + 1, rl_completer_word_break_characters); |
93 |
+ strcpy (nval + 1, rl_completer_word_break_characters); |
94 |
+ } |
94 |
+ } |
95 |
+ |
95 |
+ |
96 |
+ free (rl_completer_word_break_characters); |
96 |
+ free (rl_completer_word_break_characters); |
Link Here
|
103 |
/* Called once from parse.y if we are going to use readline. */ |
103 |
/* Called once from parse.y if we are going to use readline. */ |
104 |
void |
104 |
void |
105 |
initialize_readline () |
105 |
initialize_readline () |
106 |
@@ -538,8 +618,13 @@ initialize_readline () |
106 |
@@ -573,8 +653,13 @@ |
107 |
completion is enabled. */ |
107 |
completion is enabled. */ |
108 |
enable_hostname_completion (perform_hostname_completion); |
108 |
enable_hostname_completion (perform_hostname_completion); |
109 |
|
109 |
|
Link Here
|
115 |
/* characters that need to be quoted when appearing in filenames. */ |
115 |
/* characters that need to be quoted when appearing in filenames. */ |
116 |
- rl_filename_quote_characters = default_filename_quote_characters; |
116 |
- rl_filename_quote_characters = default_filename_quote_characters; |
117 |
+// rl_filename_quote_characters = default_filename_quote_characters; |
117 |
+// rl_filename_quote_characters = default_filename_quote_characters; |
|
|
118 |
set_filename_bstab (rl_filename_quote_characters); |
118 |
|
119 |
|
119 |
rl_filename_quoting_function = bash_quote_filename; |
120 |
rl_filename_quoting_function = bash_quote_filename; |
120 |
rl_filename_dequoting_function = bash_dequote_filename; |
121 |
--- builtins/shopt.def.orig 2014-03-02 13:30:44.000000000 -0500 |
121 |
--- builtins/shopt.def.orig 2009-01-13 05:43:16.000000000 -0800 |
122 |
+++ builtins/shopt.def 2014-03-02 13:31:38.000000000 -0500 |
122 |
+++ builtins/shopt.def 2009-03-08 01:03:39.000000000 -0800 |
123 |
@@ -103,6 +103,8 @@ |
123 |
@@ -96,6 +97,8 @@ extern int force_fignore; |
124 |
extern int complete_fullquote; |
124 |
extern int dircomplete_spelling; |
|
|
125 |
|
125 |
|
126 |
extern int enable_hostname_completion __P((int)); |
126 |
extern int enable_hostname_completion __P((int)); |
127 |
+extern int colon_is_wordbreak; |
127 |
+extern int colon_is_wordbreak; |
Link Here
|
129 |
#endif |
129 |
#endif |
130 |
|
130 |
|
131 |
#if defined (PROGRAMMABLE_COMPLETION) |
131 |
#if defined (PROGRAMMABLE_COMPLETION) |
132 |
@@ -147,6 +150,9 @@ static struct { |
132 |
@@ -166,6 +168,9 @@ |
133 |
#if defined (READLINE) |
133 |
{ "direxpand", &dircomplete_expand, shopt_set_complete_direxpand }, |
134 |
{ "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL }, |
134 |
{ "dirspell", &dircomplete_spelling, (shopt_set_func_t *)NULL }, |
135 |
#endif |
135 |
#endif |
136 |
+#if defined (READLINE) |
136 |
+#if defined (READLINE) |
Link Here
|
139 |
{ "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL }, |
139 |
{ "dotglob", &glob_dot_filenames, (shopt_set_func_t *)NULL }, |
140 |
{ "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL }, |
140 |
{ "execfail", &no_exit_on_failed_exec, (shopt_set_func_t *)NULL }, |
141 |
{ "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL }, |
141 |
{ "expand_aliases", &expand_aliases, (shopt_set_func_t *)NULL }, |
142 |
--- doc/bash.1.orig 2009-03-08 00:53:01.000000000 -0800 |
142 |
--- doc/bash.1.orig 2014-03-02 13:32:14.000000000 -0500 |
143 |
+++ doc/bash.1 2009-03-08 01:05:32.000000000 -0800 |
143 |
+++ doc/bash.1 2014-03-02 13:32:40.000000000 -0500 |
144 |
@@ -8473,6 +8473,18 @@ attempts to save all lines of a multiple |
144 |
@@ -9252,6 +9252,18 @@ |
145 |
command in the same history entry. This allows |
145 |
command in the same history entry. This allows |
146 |
easy re-editing of multi-line commands. |
146 |
easy re-editing of multi-line commands. |
147 |
.TP 8 |
147 |
.TP 8 |
Link Here
|
160 |
.B compat31 |
160 |
.B compat31 |
161 |
If set, |
161 |
If set, |
162 |
.B bash |
162 |
.B bash |
163 |
--- doc/bashref.texi.orig 2009-03-08 00:53:01.000000000 -0800 |
163 |
--- doc/bashref.texi.orig 2014-03-02 13:33:17.000000000 -0500 |
164 |
+++ doc/bashref.texi 2009-03-08 01:07:00.000000000 -0800 |
164 |
+++ doc/bashref.texi 2014-03-02 13:33:44.000000000 -0500 |
165 |
@@ -4321,6 +4321,11 @@ attempts to save all lines of a multiple |
165 |
@@ -4937,6 +4937,11 @@ |
166 |
command in the same history entry. This allows |
166 |
command in the same history entry. This allows |
167 |
easy re-editing of multi-line commands. |
167 |
easy re-editing of multi-line commands. |
168 |
|
168 |
|
Link Here
|
171 |
+separating word being completed (@pxref{Commands For Completion}). |
171 |
+separating word being completed (@pxref{Commands For Completion}). |
172 |
+This option is enabled by default. |
172 |
+This option is enabled by default. |
173 |
+ |
173 |
+ |
|
|
174 |
@item compat31 |
175 |
If set, Bash |
176 |
changes its behavior to that of version 3.1 with respect to quoted |