mirror of
https://github.com/cheat/cheat.git
synced 2026-03-07 03:03:32 +01:00
feat: add --update/-u flag to pull git-backed cheatpaths (#552)
Iterates over configured cheatpaths and runs git pull on each one that is a git repository with a clean worktree. Supports SSH remotes via key file discovery and SSH agent fallback. Works with --path filtering. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -57,9 +57,12 @@ The `cheat` command-line tool is organized into several key packages:
|
||||
### Command Layer (`cmd/cheat/`)
|
||||
- `main.go`: Entry point, cobra command definition, flag registration, command routing
|
||||
- `cmd_*.go`: Individual command implementations (view, edit, list, search, etc.)
|
||||
- `completions.go`: Dynamic shell completion functions for cheatsheet names, tags, and paths
|
||||
- Commands are routed via a `switch` block in the cobra `RunE` handler
|
||||
|
||||
### Completions (`internal/completions/`)
|
||||
- Dynamic shell completion functions for cheatsheet names, tags, and cheatpath names
|
||||
- `generate.go`: Generates completion scripts for bash, zsh, fish, and powershell
|
||||
|
||||
### Core Internal Packages
|
||||
|
||||
1. **`internal/config`**: Configuration management
|
||||
|
||||
Reference in New Issue
Block a user