fix expansion of $* and $@ in contexts where word splitting is not performed to be more consistent across different word expansions; fix pathname canonicalization when setting $BASH

This commit is contained in:
Chet Ramey
2025-11-24 09:51:15 -05:00
parent bcac47f08a
commit 4e705ed53a
13 changed files with 200 additions and 37 deletions
+14 -1
View File
@@ -820,11 +820,24 @@ get_bash_name (void)
tname = make_absolute (shell_name, get_string_value ("PWD"));
if (*shell_name == '.')
{
char *x, *fp;
x = strrchr (tname, '/');
*x = 0;
name = sh_canonpath (tname, PATH_CHECKDOTDOT|PATH_CHECKEXISTS);
*x++ = '/';
if (name == 0)
name = tname;
else
free (tname);
{
fp = sh_makepath (name, x, 0);
free (tname);
if (fp)
{
free (name);
name = fp;
}
}
}
else
name = tname;