TIL: should I use single or double quotes in git commit messages?

both works fine, but go for the single quotes; double quotes might trigger "command substitution" on unix-like systems

for example:

```bash
$ echo "`ls`"

./docs/
./node_modules/
./package-lock.json
./package.json
./pages/
./README.md
```

#git #devlife #learninginpublic

@jaggiesweekly Those are back-ticks rather than single quotes...

double quotes : "
single quote : '
back-tick : `

In Bash back-ticks offer (deprecated) command substitution, if required these days more common is $(<some_command>)

```
$ echo "$(ls)"
```

Single quotes are compounded and used when you need to quote something that itself needs quotes
```
$ echo "'ls'"

'ls'
```

Ref :

https://www.gnu.org/software/bash/manual/html_node/Double-Quotes.html

https://www.gnu.org/software/bash/manual/html_node/Command-Substitution.html

#bash #shell #quotes #substitution

Double Quotes (Bash Reference Manual)

Double Quotes (Bash Reference Manual)

@slackline ⬆️⬆️⬆️ thanks for correcting me and for the references! much appreciated! 💖

@jaggiesweekly You're welcome, hope it didn't come across as patronising (always tricky on line).

So many people have helped me learn computing over the years I just wanted to share something I've learned about #bash

@slackline yeah, that's always a tricky line, but fear not I read your comment with an open mind. I'm not perfect, and if you teach me something new, that's enough! congratulations on taking the time to help an unknown person from the internet :) 🫰🏻