Skip to content

Commit 84f77c5

Browse files
fix: update fzf and VHS examples for better compatibility (#109)
- fzf: Replace `become` action with variable capture approach The `become` action can cause "Failed to initialize input reader" errors on some systems (e.g., macOS) when launching TUI apps - VHS: Use semicolon instead of && for command chaining Ensures FINISHED marker is printed even if gitlogue exits non-zero Fixes #107 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude <noreply@anthropic.com>
1 parent 92aa40c commit 84f77c5

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

docs/usage.md

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,11 @@ Type "cd my-project"
437437
Enter
438438
Sleep 500ms
439439
440-
Type "gitlogue --theme dracula --commit abc123 && echo 'Finished'"
440+
Type "gitlogue --theme dracula --commit abc123; echo FINISHED"
441441
Enter
442442
443-
# Wait for gitlogue to complete
444-
Wait /Finished/
443+
# Wait for FINISHED to appear anywhere on screen (120s timeout for large commits)
444+
Wait+Screen@120s /FINISHED/
445445
Sleep 1s
446446
```
447447

@@ -461,12 +461,14 @@ Add this function to your `~/.bashrc` or `~/.zshrc`:
461461
```bash
462462
# Browse commits and launch gitlogue on selection
463463
glf() {
464-
git log --oneline --color=always "$@" | \
464+
local commit
465+
commit=$(git log --oneline --color=always "$@" | \
465466
fzf --ansi \
466467
--no-sort \
467468
--preview 'git show --stat --color=always {1}' \
468-
--preview-window=right:60% \
469-
--bind 'enter:become(gitlogue --commit {1})'
469+
--preview-window=right:60% | \
470+
awk '{print $1}')
471+
[ -n "$commit" ] && gitlogue --commit "$commit"
470472
}
471473
```
472474

@@ -499,9 +501,8 @@ gitlogue-menu() {
499501
gitlogue
500502
;;
501503
"Specific commit")
502-
git log --oneline | \
503-
fzf --prompt="Select commit> " \
504-
--bind 'enter:become(gitlogue --commit {1})'
504+
local commit=$(git log --oneline | fzf --prompt="Select commit> " | awk '{print $1}')
505+
[ -n "$commit" ] && gitlogue --commit "$commit"
505506
;;
506507
"By author")
507508
local author=$(git log --format='%an' | sort -u | fzf --prompt="Select author> ")

0 commit comments

Comments
 (0)