feat: add context lines for preview mode with intelligent truncation
- Add --context-lines (-c) flag to control preview context display - Add context_lines option to .shush.toml configuration - Implement lazy-git style preview with context lines around changes - Add intelligent truncation with "..." markers for distant changes - Improve context line colors from dark gray to light for better visibility on dark terminals - Support both regular and git-aware preview modes - Default to 3 context lines, configurable via flag or config file - Use -c 0 to show only changed lines (original behavior)
This commit is contained in:
@@ -11,6 +11,7 @@ type CLI struct {
|
||||
Backup bool `help:"Create backup files before modification"`
|
||||
Verbose bool `help:"Show detailed output"`
|
||||
PreserveLines bool `help:"Remove comments but preserve empty lines"`
|
||||
ContextLines int `short:"c" help:"Number of context lines to show in preview mode (default: from config)" default:"-1"`
|
||||
LLM bool `help:"Show LLM-friendly usage guide"`
|
||||
ChangesOnly bool `help:"Remove comments only from git changes (staged + unstaged + untracked)"`
|
||||
Staged bool `help:"Remove comments only from staged git changes"`
|
||||
|
||||
Reference in New Issue
Block a user