Skip to content

Commit 0f50411

Browse files
committed
docs: Clarify that --version/-V is handled by g
The documentation previously stated "all arguments are passed directly" which was misleading since --version/-V is intercepted by g itself. Updated epilog and documentation to accurately describe this behavior.
1 parent 430350e commit 0f50411

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

AGENTS.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ g is a lightweight CLI wrapper that proxies to the current directory's VCS comma
1717

1818
Key features:
1919
- Detects VCS by walking parent directories and mapping `.git`, `.svn`, or `.hg`
20-
- Proxies CLI arguments directly to the detected VCS binary
20+
- Proxies CLI arguments to the detected VCS binary (--version/-V is handled by g)
2121
- Minimal surface area: primary logic lives in `src/g/__init__.py`
2222
- Test fixtures cover CLI behavior for both repo and non-repo directories
2323

docs/cli/index.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ When you run `g`, it:
1212
2. Invokes the corresponding VCS (`git`, `svn`, or `hg`) with your arguments
1313
3. Exits after the command completes
1414

15+
**Note:** `--version`/`-V` is handled by g itself rather than passed to the VCS.
16+
1517
## Usage
1618

1719
```console

src/g/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def create_parser() -> argparse.ArgumentParser:
5656
prog="g",
5757
description="CLI alias for your current directory's VCS command "
5858
"(git, svn, hg).",
59-
epilog="All arguments are passed directly to the detected VCS.",
59+
epilog="Arguments are passed to the detected VCS (except --version/-V).",
6060
formatter_class=argparse.RawDescriptionHelpFormatter,
6161
)
6262
parser.add_argument(

0 commit comments

Comments
 (0)