You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This isn't the way bash does it, but #451 made me think that this might be a good idea. (We copied bash's strategy of doing an entirely separate preprocessing/lexing phase.)
And I think it's pretty easily possible.
Comments aren't purely lexical because of echo x#notcomment and echo 'x'#notcomment, etc.
notes: in bash, history is expanded in double quotes, NOT in single quotes, and NOT in comments.
We can easily implement that rule. (Although honestly I don't see a use case for it being expanded in double quotes...)
$ echo hi
hi
$ echo "!!"
echo "echo hi"
echo hi
The text was updated successfully, but these errors were encountered:
A few people mentioned here that they don't like that history is expanded within double quotes like "!!", which I agree with. If we do it as part of the parser it would fix that problem.
zsh has hist_verify, which shows the result of history replacements/substitutions, and makes you hit enter again before execution. Seems like a nice middle ground between “blind” and TUI.
This isn't the way bash does it, but #451 made me think that this might be a good idea. (We copied bash's strategy of doing an entirely separate preprocessing/lexing phase.)
And I think it's pretty easily possible.
Comments aren't purely lexical because of
echo x#notcomment
andecho 'x'#notcomment
, etc.notes: in bash, history is expanded in double quotes, NOT in single quotes, and NOT in comments.
We can easily implement that rule. (Although honestly I don't see a use case for it being expanded in double quotes...)
The text was updated successfully, but these errors were encountered: