diff --git a/src/common.cpp b/src/common.cpp index 040a22d9d..0c052282f 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -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 diff --git a/src/expand.cpp b/src/expand.cpp index 194b4b941..631c6638a 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -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) { diff --git a/src/highlight.cpp b/src/highlight.cpp index 1c91172d7..c0366c7d5 100644 --- a/src/highlight.cpp +++ b/src/highlight.cpp @@ -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; }