mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-07-06 11:50:49 +02:00
commit bash-20180601 snapshot
This commit is contained in:
@@ -475,6 +475,7 @@ The default value is @samp{off}.
|
||||
If set to @samp{on}, and @var{completion-ignore-case} is enabled, Readline
|
||||
treats hyphens (@samp{-}) and underscores (@samp{_}) as equivalent when
|
||||
performing case-insensitive filename matching and completion.
|
||||
The default value is @samp{off}.
|
||||
|
||||
@item completion-prefix-display-length
|
||||
@vindex completion-prefix-display-length
|
||||
@@ -802,7 +803,7 @@ Meta-Rubout: backward-kill-word
|
||||
Control-o: "> output"
|
||||
@end example
|
||||
|
||||
In the above example, @kbd{C-u} is bound to the function
|
||||
In the example above, @kbd{C-u} is bound to the function
|
||||
@code{universal-argument},
|
||||
@kbd{M-DEL} is bound to the function @code{backward-kill-word}, and
|
||||
@kbd{C-o} is bound to run the macro
|
||||
@@ -2289,7 +2290,7 @@ _comp_cd()
|
||||
local cur _skipdot _cdpath
|
||||
local i j k
|
||||
|
||||
# Tilde expansion, with side effect of expanding tilde to full pathname
|
||||
# Tilde expansion, which also expands tilde to full pathname
|
||||
case "$2" in
|
||||
\~*) eval cur="$2" ;;
|
||||
*) cur=$2 ;;
|
||||
|
||||
+16
-32
@@ -1429,11 +1429,11 @@ history_tokenize_word (const char *string, int ind)
|
||||
}
|
||||
}
|
||||
|
||||
if (member (string[i], "<>;&|$"))
|
||||
if (member (string[i], "<>;&|"))
|
||||
{
|
||||
int peek = string[i + 1];
|
||||
|
||||
if (peek == string[i] && peek != '$')
|
||||
if (peek == string[i])
|
||||
{
|
||||
if (peek == '<' && string[i + 2] == '-')
|
||||
i++;
|
||||
@@ -1456,9 +1456,8 @@ history_tokenize_word (const char *string, int ind)
|
||||
i += 2;
|
||||
return i;
|
||||
}
|
||||
/* XXX - separated out for later -- bash-4.2 */
|
||||
else if ((peek == '(' && (string[i] == '>' || string[i] == '<')) || /* ) */
|
||||
(peek == '(' && string[i] == '$')) /*)*/
|
||||
/* XXX - process substitution -- separated out for later -- bash-4.2 */
|
||||
else if (peek == '(' && (string[i] == '>' || string[i] == '<')) /*)*/
|
||||
{
|
||||
i += 2;
|
||||
delimopen = '(';
|
||||
@@ -1466,34 +1465,9 @@ history_tokenize_word (const char *string, int ind)
|
||||
nestdelim = 1;
|
||||
goto get_word;
|
||||
}
|
||||
#if 0
|
||||
else if (peek == '\'' && string[i] == '$')
|
||||
{
|
||||
i += 2; /* XXX */
|
||||
return i;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (string[i] != '$')
|
||||
{
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
}
|
||||
|
||||
/* same code also used for $(...)/<(...)/>(...) above */
|
||||
if (member (string[i], "!@?+*"))
|
||||
{
|
||||
int peek = string[i + 1];
|
||||
|
||||
if (peek == '(') /*)*/
|
||||
{
|
||||
/* Shell extended globbing patterns */
|
||||
i += 2;
|
||||
delimopen = '(';
|
||||
delimiter = ')'; /* XXX - not perfect */
|
||||
nestdelim = 1;
|
||||
}
|
||||
i++;
|
||||
return i;
|
||||
}
|
||||
|
||||
get_word:
|
||||
@@ -1538,6 +1512,16 @@ get_word:
|
||||
continue;
|
||||
}
|
||||
|
||||
/* Command and process substitution; shell extended globbing patterns */
|
||||
if (nestdelim == 0 && delimiter == 0 && member (string[i], "<>$!@?+*") && string[i+1] == '(') /*)*/
|
||||
{
|
||||
i += 2;
|
||||
delimopen = '(';
|
||||
delimiter = ')';
|
||||
nestdelim = 1;
|
||||
continue;
|
||||
}
|
||||
|
||||
if (delimiter == 0 && (member (string[i], history_word_delimiters)))
|
||||
break;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user