Skip to content

Use case from the documentation does not work #107

Closed

Description

@Wolfsrudel

I would like to use the "Basic Commit Browser" mentioned in the documentation.

The code is as follows:

# Select and view a commit with fzf
git log --oneline --color=always | \
  fzf --ansi --preview 'gitlogue --commit {1}' \
      --preview-window=right:70%

Unfortunately, in my case, the fzf preview window only displays "Loading...".

My system

  • MacOS 15.7.1
  • bash 5.3.3(1)-release (aarch64-apple-darwin24.4.0)
  • fzf 0.67.0 (v0.67.0)
  • gitlogue 0.0.1 (from gitlogue --version)

Is the mistake mine? :)

Activity

  1. linear commented on Nov 26, 2025

    @linear
  2. added 5 commits that reference this issue on Nov 26, 2025
    0d9bf14
    970f1f2
    2348c59
    6c94bc4
    ca748da
  3. unhappychoice commented on Nov 26, 2025

    @unhappychoice
    Owner

    Thanks for reporting this issue!

    You're right - gitlogue is a TUI application that cannot run inside fzf's preview window. The documentation example was incorrect.

    This has been fixed in #108. The correct usage is:

    git log --oneline --color=always | \
      fzf --ansi --preview 'git show --stat --color=always {1}' \
          --preview-window=right:70% \
          --bind 'enter:become(gitlogue --commit {1})'

    The preview shows git show output, and gitlogue launches when you press Enter.

  4. Wolfsrudel commented on Nov 26, 2025

    @Wolfsrudel
    Author

    git log --oneline --color=always |
    fzf --ansi --preview 'git show --stat --color=always {1}'
    --preview-window=right:70%
    --bind 'enter:become(gitlogue --commit {1})'

    Thank you.

    But still:

    bash-5.3$ git log --oneline --color=always |   fzf --ansi --preview 'git show --stat --color=always {1}'       --preview-window=right:70%       --bind 'enter:become(gitlogue --commit {1})'
    Error: Failed to initialize input reader
  5. Wolfsrudel commented on Nov 26, 2025

    @Wolfsrudel
    Author

    I also think the vhs example is not working as expected. :/

  6. added a commit that references this issue on Nov 26, 2025
    54f8f81
  7. unhappychoice commented on Nov 26, 2025

    @unhappychoice
    Owner

    Thanks for the additional feedback!

    I've created #109 to fix both issues:

    1. fzf become error: The become action can cause "Failed to initialize input reader" on some systems when launching TUI apps. Changed to capture commit hash in a variable first, then launch gitlogue.

    2. VHS example: Fixed the tape example to work reliably.

    The fzf integration works on my Linux environment, but the become approach seems to have compatibility issues on macOS. The new approach using variable capture should work universally.

  8. added 3 commits that reference this issue on Nov 26, 2025
    f0d0723
    dbc5fb8
    84f77c5
  9. unhappychoice commented on Nov 26, 2025

    @unhappychoice
    Owner

    Fixed in #109. The documentation now uses:

    fzf: Variable capture instead of become action

    commit=$(git log --oneline | fzf ... | awk '{print $1}')
    [ -n "$commit" ] && gitlogue --commit "$commit"

    VHS: Proper Wait syntax with screen-wide matching and timeout

    Type "gitlogue --theme dracula --commit abc123; echo FINISHED"
    Enter
    Wait+Screen@120s /FINISHED/

    Please try with the latest documentation and let us know if it works!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions