Describe the bugtypeset -fp prints command substitutions in the $() format even if the original function definition contained them in the backquoted form. In doing so, some quotations may not retain their exact semantics.
To Reproduce
$ foo() { `'`; }
$ typeset -fp foo
foo()
{
$(')
}
$(') does not parse the same as the original backquoted command substitution.
Expected behavior
The printed function body should include the same backquoted command substitution.
(Issue migrated from https://osdn.net/projects/yash/ticket/43410)
Describe the bug
typeset -fp
prints command substitutions in the$()
format even if the original function definition contained them in the backquoted form. In doing so, some quotations may not retain their exact semantics.To Reproduce
$(')
does not parse the same as the original backquoted command substitution.Expected behavior The printed function body should include the same backquoted command substitution.