Skip to content

Commit 2ca063a

Browse files
committed
docs: update shell/README.md
1 parent 0179439 commit 2ca063a

1 file changed

Lines changed: 5 additions & 7 deletions

File tree

shell/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,16 @@ This script should be used as an **alternative** to using VS Code itself to hand
3333

3434
But, if you don't use it as an actual hook, there is an alternative flow that doesn't mess with VS Code. You can use the other script and set up a Git alias (which can be used across projects without setting a hook even).
3535

36-
e.g.
36+
Sample output:
3737

3838
```console
3939
$ ./shell/autofill.sh
4040
chore: update settings.json
41-
```
42-
43-
```console
4441
$ ./shell/autofill.sh
4542
update 11 files
4643
```
4744

48-
Use it. This uses the tool to generate a message and pass it as the Git commit message, but forcing edit mode so you can override it.
45+
Use it with Git. This uses the tool to generate a message and pass it as the Git commit message, but forcing edit mode so you can override it.
4946

5047
```sh
5148
$ git commit --edit -m "$(shell/autofill.sh)"
@@ -65,14 +62,14 @@ TODO:
6562

6663
#### Alias
6764

68-
Set this up in git config aliases as `c` or something. If this was in a _bin_ directory, or used with an absolute path to the script. The
65+
Set this up in git config aliases as `c` or something. If this was in a _bin_ directory, or used with an absolute path to the script.
6966

7067
```toml
7168
[alias]
7269
c = '! git commit --edit -m "$(autofill.sh)"'
7370
```
7471

75-
Then instead of `git commit`, you do:
72+
Then instead of `git commit`, you cando:
7673

7774
```sh
7875
$ git c
@@ -87,3 +84,4 @@ stone. But ideally the JS files can be copied outside of this project to a centr
8784
with a `bin` entry point). And the SH script can be added to an individual project in `.git/hooks` dir as `prepare-commit-msg`.
8885
- When using this as a hook, consider reading from the **existing** commit message file in the case
8986
of template, so it that can be passed on.
87+
- Add a flag for staged to get `--cached` flag.

0 commit comments

Comments
 (0)