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

local / declare, etc. can't be aliased #392

Closed
andychu opened this issue Jul 3, 2019 · 2 comments
Closed

local / declare, etc. can't be aliased #392

andychu opened this issue Jul 3, 2019 · 2 comments

Comments

@andychu
Copy link
Contributor

andychu commented Jul 3, 2019

From #236 by @lhoursquentin

I'm not sure what I think about this yet, but it seems to be a separate issue.

For instance mksh has by default an alias to replace local by typeset

$ mksh -c alias | grep local
local='\\builtin typeset'
@andychu
Copy link
Contributor Author

andychu commented Jul 3, 2019

Also here is my snippet from Zulip showing why declare has to be statically parsed sometimes.

I think what other shells do is set some flags in words for "nosplit" or something like that.

$ d=declare
$ x='a b'

$ declare x=$x  # statically parsed, shell knows it's declare, no word splitting
$ echo $x
a b

$ $d x=$x  # dynamically parsed, word splitting
$ echo $x
a

@andychu
Copy link
Contributor Author

andychu commented Jul 27, 2019

Fixed with 0.7.pre2

@andychu andychu closed this as completed Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant