mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-26 21:03:12 +00:00
Initial removal of '%' syntax for process/job expansion
This commit is contained in:
parent
b50541c655
commit
e45e2bf20e
3 changed files with 2 additions and 10 deletions
|
@ -1002,7 +1002,6 @@ static void escape_string_script(const wchar_t *orig_in, size_t in_len, wcstring
|
|||
case L'|':
|
||||
case L';':
|
||||
case L'"':
|
||||
case L'%':
|
||||
case L'~': {
|
||||
if (!no_tilde || c != L'~') {
|
||||
need_escape = 1;
|
||||
|
@ -1316,12 +1315,6 @@ static bool unescape_string_internal(const wchar_t *const input, const size_t in
|
|||
}
|
||||
break;
|
||||
}
|
||||
case L'%': {
|
||||
if (unescape_special && (input_position == 0)) {
|
||||
to_append_or_none = PROCESS_EXPAND;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case L'*': {
|
||||
if (unescape_special) {
|
||||
// In general, this is ANY_STRING. But as a hack, if the last appended char
|
||||
|
|
|
@ -590,6 +590,7 @@ static bool expand_pid(const wcstring &instr_with_sep, expand_flags_t flags,
|
|||
|
||||
// We know we are a process expansion now.
|
||||
assert(in[0] == PROCESS_EXPAND);
|
||||
return true;
|
||||
|
||||
if (flags & EXPAND_FOR_COMPLETIONS) {
|
||||
if (wcsncmp(in + 1, SELF_STR, wcslen(in + 1)) == 0) {
|
||||
|
|
|
@ -120,7 +120,6 @@ bool is_potential_path(const wcstring &potential_path_fragment, const wcstring_l
|
|||
for (size_t i = 0; i < path_with_magic.size(); i++) {
|
||||
wchar_t c = path_with_magic.at(i);
|
||||
switch (c) {
|
||||
case PROCESS_EXPAND:
|
||||
case VARIABLE_EXPAND:
|
||||
case VARIABLE_EXPAND_SINGLE:
|
||||
case BRACKET_BEGIN:
|
||||
|
@ -535,8 +534,7 @@ static void color_argument_internal(const wcstring &buffstr,
|
|||
} else {
|
||||
// Not a backslash.
|
||||
switch (c) {
|
||||
case L'~':
|
||||
case L'%': {
|
||||
case L'~': {
|
||||
if (in_pos == 0) {
|
||||
colors[in_pos] = highlight_spec_operator;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue