Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typeset -fp may print ill-formed command substitution #21

Open
magicant opened this issue Sep 11, 2023 · 0 comments
Open

typeset -fp may print ill-formed command substitution #21

magicant opened this issue Sep 11, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@magicant
Copy link
Owner

(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

$ 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.

@magicant magicant added the bug Something isn't working label Sep 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant