4 ms·
$ echo $SHELL zsh $ git commit -m $'Bugfix #95\n\nEverything's fine, please move along.'
by majewsky 6y ago
$ echo $SHELL
zsh
$ git commit -m $'Bugfix #95\n\nEverything's fine, please move along.'
- gorgoiler 6y agoFYI bash also interpolates C escape strings with $’…’ syntax. The apostrophe in your example breaks the command. I actually installed zsh and ran this because I assumed your point was that zsh magically handled the «‘s» in «Everything’s». Alas, no.
- majewsky 6y agoAnd that's why you always test your one-liners before posting. :) > I assumed your point was that zsh magically handled the «‘s» in «Everything’s» I'm very glad it doesn't. String parsing and expansion rules in Bourne-like shells are already complex enough as it is.