Skip to content

Commit 9c1b1a1

Browse files
ryan-williamsclaude
andcommitted
Update docs for shell completion feature
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a098d0e commit 9c1b1a1

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

CLAUDE.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ The gist is a **read replica** of the local clone. `push`/`pull` operations sync
3131
- ✅ Draft comment workflow: `new*.md` → post → rename
3232
- ✅ Unified diff display between `diff` and `push -n`
3333
- ✅ Image upload command using `utz.git.gist`
34-
- ✅ PyPI package `ghpr-py` published (v0.1.0)
34+
- ✅ Shell completion (Click-powered, subcommands + flags/options on bare `<tab>`)
35+
- ✅ Shell integration with aliases (`ghprc`, `ghprd`, `ghprp`, `ghia`, etc.)
36+
- ✅ PyPI package `ghpr-py` published
3537
- ✅ Repository created with filtered history
3638
- ✅ Modular package structure (commands in separate modules)
3739
- ✅ Using published `utz>=0.21.3` for git utilities
@@ -54,6 +56,7 @@ The gist is a **read replica** of the local clone. `push`/`pull` operations sync
5456
├── config.py # Git config helpers
5557
├── patterns.py # Regex patterns
5658
├── render.py # Diff rendering utilities
59+
├── shell/ # Shell integration scripts (bash, fish)
5760
└── commands/ # Modular command implementations
5861
├── clone.py
5962
├── create.py # Also contains `init` command
@@ -69,12 +72,19 @@ The gist is a **read replica** of the local clone. `push`/`pull` operations sync
6972

7073
### Recent Changes
7174

72-
**Comment Ownership Warnings** (latest):
75+
**Shell Completion** (latest):
76+
- Click-powered tab completion for subcommands, flags, and options
77+
- Patched `Command.shell_complete` and `Argument.shell_complete` in `cli.py` to suggest options on bare `<tab>` (Click only does this when user types `-`)
78+
- Completion script generated inline by `shell_integration.py` (avoids extra Python invocation)
79+
- Click's Bash version warning suppressed (macOS system bash 3.2 triggers it)
80+
- `ghia` alias added for `ghpr ingest-attachments`
81+
82+
**Comment Ownership Warnings**:
7383
- `ghpr diff` and `ghpr push -n` warn when showing diffs for comments authored by others
7484
- `ghpr push` skips others' comments by default, with clear summary message
7585
- Use `-C` (`--force-others`) to attempt pushing edits to others' comments
7686

77-
**Trailing Newline Handling** (latest):
87+
**Trailing Newline Handling**:
7888
- `write_description_with_link_ref` ensures files always end with a newline
7989
- Fixes diff thrashing when GitHub strips trailing newlines from PR descriptions
8090
- `render_unified_diff` only shows "No newline" indicator when sides actually differ

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
- **Gist mirroring** for version control and sharing
2222
- **Comment management** - edit and sync PR/issue comments
2323
- **Draft comments** - create `new*.md` files, push to post as comments
24+
- **Shell integration** - aliases and tab completion for subcommands, flags, and options
2425

2526
## Installation
2627

@@ -114,7 +115,7 @@ ghpr shell-integration fish | source
114115

115116
### Available Aliases
116117

117-
After enabling shell integration, you get convenient shortcuts and tab completion for subcommands:
118+
After enabling shell integration, you get convenient shortcuts and tab completion for subcommands, flags, and options:
118119

119120
```bash
120121
ghprc # ghpr clone (+ cd into directory)

0 commit comments

Comments
 (0)