mirror of
https://https.git.savannah.gnu.org/git/bash.git
synced 2026-08-09 03:30:48 +02:00
change to how invisible characters in prompt string expansions are escaped
This commit is contained in:
@@ -5742,7 +5742,12 @@ decode_prompt_string (string)
|
||||
temp = base_pathname (shell_name);
|
||||
/* Try to quote anything the user can set in the file system */
|
||||
if (promptvars || posixly_correct)
|
||||
temp = sh_backslash_quote_for_double_quotes (temp, 1);
|
||||
{
|
||||
char *t;
|
||||
t = sh_strvis (temp);
|
||||
temp = sh_backslash_quote_for_double_quotes (t, 0);
|
||||
free (t);
|
||||
}
|
||||
else
|
||||
temp = sh_strvis (temp);
|
||||
goto add_string;
|
||||
@@ -5819,7 +5824,12 @@ decode_prompt_string (string)
|
||||
/* Make sure that expand_prompt_string is called with a
|
||||
second argument of Q_DOUBLE_QUOTES if we use this
|
||||
function here. */
|
||||
temp = sh_backslash_quote_for_double_quotes (t_string, 1);
|
||||
{
|
||||
char *t;
|
||||
t = sh_strvis (t_string);
|
||||
temp = sh_backslash_quote_for_double_quotes (t, 0);
|
||||
free (t);
|
||||
}
|
||||
else
|
||||
temp = sh_strvis (t_string);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user