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 works in bash, but in VS Code, the default has now become zsh, which yields an error (because of an interplay between the double quote and the !). Some possible fixes:
Thanks for the report! I'll look into this on the next round of revisions to the book.
It does strike me as odd that the editor would be picking the shell, though - isn't the shell selected by your user setup? My understanding is that Mac OS replaced its default shell with zsh a couple of years ago - are you on a Mac?
This kind of thing is also an issue for other shells that are less compatible with sh, like fish and the various Windows ones (this example works in fish, but others may not). I'll think about just rewriting the section to do I/O from a file instead of using echo, which should be more portable if a bit less punchy.
Thank you! What I meant is that VS Code tells me "The default interactive shell is now zsh" when I select bash, which I originally interpreted as a message from VS Code. I'm on Mac and inspecting further, it seems to be the case that this is due to it being the Mac default indeed!
Having more portable instructions would certainly be nice (especially for people like me who know hardly any shell commands)!
Please quote the text that is incorrect:
In what way is this incorrect?
This works in
bash
, but in VS Code, the default has now becomezsh
, which yields an error (because of an interplay between the double quote and the!
). Some possible fixes:The text was updated successfully, but these errors were encountered: