Closed tyconway closed 2 years ago
What command are you running? Do you get this symptom in all terminals you mentioned?
Also, can you set the following variables and share the output?
export GF_DEBUG_MODE="YES"
export GF_COMMAND_DEBUG_MODE="YES"
export GF_COMMAND_FZF_DEBUG_MODE="YES"
export GF_COMMAND_LOG_OUTPUT="YES"
export GF_INTERNAL_COMMAND_DEBUG_MODE="YES"
This will help me debug and diagnose the issue.
I'm running git fuzzy status
and then committing anything. It goes out to Vim, I type a commit message, and when it returns to the command line is when I'm seeing the symptom.
Here's the output:
❯ git fuzzy status
hint: Waiting for your editor to close the file... Vim: Warning: Input is not from a terminal
[master 51f4b3d] Test
1 file changed, 1 insertion(+)
[DBG] `hub` not found, disabling GitHub support.
[CMD] (internal) $ gf_status
[CMD] $ fzf --ansi --no-sort --no-info --multi --bind "ctrl-d:deselect-all" --bind "ctrl-a:select-all" --preview-window=right:50% -m --header $'\nType to filter. \E[37mEnter\E(B\E[m to \E[32mACCEPT\E(B\E[m\n\n \E[90m-- (\E(B\E[m*\E[90m) editor: \E[35m \E(B\E[m\E(B\E[m\n * \E[32m\E[1medit ✎\E(B\E[m \E[37mCtrl-E\E(B\E[m\n \E[32mall ☑\E(B\E[m \E[37mCtrl-A\E(B\E[m \E[32mstage \E[1m⇡\E(B\E[m \E[37mCtrl-S\E(B\E[m \E[31m\E[1mdiscard ✗\E(B\E[m \E[37mCtrl-U\E(B\E[m\n \E[32mnone ☐\E(B\E[m \E[37mCtrl-D\E(B\E[m \E[32mreset \E[31m\E[1m⇣\E(B\E[m \E[37mCtrl-R\E(B\E[m * \E[31m\E[1mcommit \E(B\E[m\E[31m⇧\E(B\E[m \E[37mCtrl-M\E(B\E[m\n\n' --header-lines=2 --expect=ctrl-e\,ctrl-m --nth=2 --preview git\ fuzzy\ helper\ status_preview_content\ \{1\}\ \{2..\} --bind ctrl-s:execute-silent\(git\ fuzzy\ helper\ status_add\ \{+2..\}\)+down+reload:git\ fuzzy\ helper\ status_menu_content --bind ctrl-r:execute-silent\(git\ fuzzy\ helper\ status_reset\ \{+2..\}\)+down+reload:git\ fuzzy\ helper\ status_menu_content --bind ctrl-u:execute-silent\(git\ fuzzy\ helper\ status_discard\ \{+2..\}\)+reload:git\ fuzzy\ helper\ status_menu_content
[CMD] (internal) $ gf_helper_status_menu_content
[CMD] (internal) $ gf_helper_status_preview_content M file.txt
[CMD] (internal) $ gf_helper_status_add file.txt
[CMD] $ git add -- file.txt
[CMD] (internal) $ gf_helper_status_menu_content
[CMD] (internal) $ gf_helper_status_preview_content M file.txt
[CMD] (internal) $ gf_helper_status_commit
[CMD] $ git commit
%
You can see the symptom begins immediately and affects the debug output. Yes, this happens in each of the terminals I mentioned. I haven't tried it in other shells however. Let me give that a go.
Here's in bash:
Tys-MacBook-Air:fuzzy-issue tyconway$ git fuzzy status
hint: Waiting for your editor to close the file... Vim: Warning: Input is not from a terminal
[master 06105d5] Another test
1 file changed, 1 insertion(+)
[DBG] `hub` not found, disabling GitHub support.
[CMD] (internal) $ gf_status
[CMD] $ fzf --ansi --no-sort --no-info --multi --bind "ctrl-d:deselect-all" --bind "ctrl-a:select-all" --preview-window=right:50% -m --header $'\nType to filter. \E[37mEnter\E(B\E[m to \E[32mACCEPT\E(B\E[m\n\n \E[90m-- (\E(B\E[m*\E[90m) editor: \E[35m \E(B\E[m\E(B\E[m\n * \E[32m\E[1medit �\234\216\E(B\E[m \E[37mCtrl-E\E(B\E[m\n \E[32mall �\230\221\E(B\E[m \E[37mCtrl-A\E(B\E[m \E[32mstage \E[1m�\207�\E(B\E[m \E[37mCtrl-S\E(B\E[m \E[31m\E[1mdiscard �\234\227\E(B\E[m \E[37mCtrl-U\E(B\E[m\n \E[32mnone �\230\220\E(B\E[m \E[37mCtrl-D\E(B\E[m \E[32mreset \E[31m\E[1m�\207�\E(B\E[m \E[37mCtrl-R\E(B\E[m * \E[31m\E[1mcommit \E(B\E[m\E[31m�\207�\E(B\E[m \E[37mCtrl-M\E(B\E[m\n\n' --header-lines=2 --expect=ctrl-e\,ctrl-m --nth=2 --preview git\ fuzzy\ helper\ status_preview_content\ \{1\}\ \{2..\} --bind ctrl-s:execute-silent\(git\ fuzzy\ helper\ status_add\ \{+2..\}\)+down+reload:git\ fuzzy\ helper\ status_menu_content --bind ctrl-r:execute-silent\(git\ fuzzy\ helper\ status_reset\ \{+2..\}\)+down+reload:git\ fuzzy\ helper\ status_menu_content --bind ctrl-u:execute-silent\(git\ fuzzy\ helper\ status_discard\ \{+2..\}\)+reload:git\ fuzzy\ helper\ status_menu_content
[CMD] (internal) $ gf_helper_status_menu_content
[CMD] (internal) $ gf_helper_status_preview_content M file.txt
[CMD] (internal) $ gf_helper_status_preview_content M file.txt
[CMD] (internal) $ gf_helper_status_add file.txt
[CMD] $ git add -- file.txt
[CMD] (internal) $ gf_helper_status_menu_content
[CMD] (internal) $ gf_helper_status_preview_content M file.txt
[CMD] (internal) $ gf_helper_status_commit
[CMD] $ git commit
Tys-MacBook-Air:fuzzy-issue tyconway$
This seems like something that's an issue on your machine. Since all that debug output is written to files with line separators and then cat
'ed to /dev/stderr
. The fact that that's misbehaving makes me think your dot-files are doing something to your shell environment to cause this.
Closing this. Apologies this doesn't work for you but since this is a personal/passion project I'm unable to spend time debugging one-off issues like this.
I wish you luck in figuring this out. Feel free to reopen this if you feel there's more information that I can use to help diagnose/fix.
Sorry to re-open, but I'm having the same issue on MacOS iterm2, with zsh. I also notice when I use the commit action, vim opens but backspace in insert mode sends ^? instead of deleting. Could it be that the TERM environment is not being set correctly when executing shell commands from within git fuzzy?
@zetaqubit - if you're able to reproduce w/ a clean shell & in a minimally configured terminal emulator, then I could help you diagnose and fix:
$ env -i bash
<opens subshell>
# in the subshell, modify the environment minimally to get `git-fuzzy` working:
# for example, if using brew
$ eval "$(brew shellenv)"
$ export PATH="/path/to/git-fuzzy/bin:$PATH"
# then perform the same action
@tyconway if this is still an issue, see repro help above
Environment: macOS Big Sur 11.3+ zsh Native Terminal, VS Code Terminal, iTerm2
Each successive run adds another swath of whitespace to future output. Haven't tested other commands.