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
Copy file name to clipboardExpand all lines: shell/README.md
+8-5Lines changed: 8 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,21 @@
1
1
2
2
# Shell
3
3
4
-
See [acm-hook.sh](acm-hook.sh).
4
+
See [acm-hook.sh](acm-hook.sh) script.
5
5
6
-
A CLI script that bypasses using VS Code or an extension.
7
-
It will get output from Git, send it to Node CLI entry-point tool and print
8
-
it. This can be used as part of Git commit message hook flow (pre-commit hook).
6
+
A Bash CLI script that bypasses using VS Code or an extension. It will get output from Git, send it to Node CLI entry-point tool and print
7
+
it.
9
8
9
+
This can be used as part of Git commit message hook flow such as a **pre-commit hook**.
10
+
11
+
> [!NOTE]
12
+
> For **cross-platform support**, see [CLI docs](/docs/cli.md) as that uses Node instead of Bash and also supports creating a pre-built binary for distribution. Also that approach uses a new command which wraps the Git commit logic, while shell acm-hook.sh script works the opposite way as called by Git.
10
13
11
14
## Setup
12
15
13
16
If you want to use the hook:
14
17
15
-
1. Follow instructions to install the TS command globally as per [src/cli/README.md](/src/cli/README.md)
18
+
1. Follow instructions to install the commands globally as per [CLI docs](/docs/cli.md).
Copy file name to clipboardExpand all lines: shell/TODO.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -6,9 +6,10 @@ of template, so it that can be passed on.
6
6
-[ ] Add a flag for staged to get `--cached` flag.
7
7
-[ ] How to automated the install process for upgrades. Maybe the JS + shell script as NPM package or at least on GitHub with cURL install.
8
8
-[ ] Figure out how to switch between staged and not, with `--cached`. Like passing a param to the shell script and having two aliases. Or to have it as pass of the shell script to fallback to all if anything is staged. Or just control with filenames e.g. `git c .` or `git c package*` - oh wait, the shell script doesn't look at what is passed to `git commit`, only what is staged or not.
9
-
- Fix bug where message is on modified and staged but only staged is committed with gacm or acm
9
+
-[ ]Fix bug where message is on modified and staged but only staged is committed with gacm or acm
10
10
11
11
If the flag is omitted, then the standard `git status` logic is followed:
12
12
look for staged changes and use them, otherwise use unstaged changes.
13
13
there's a problem - commit does not take cached flag - but it will use implied staged or not. so do not pass through.
14
14
BUT could look at advanced mode of pass through names of files to commit IF they are handled by status and commit, but using manual git add is good enough probably. esp for untracked files which need add anyway.
15
+
-[ ] See if it is possible to make the shell script here shorter and use the logic in acm instead and a minimal .sh hook file.
0 commit comments