laktak / extrakto

extrakto for tmux - quickly select, copy/insert/complete text without a mouse
MIT License
878 stars 45 forks source link

the split disappears immediately #19

Closed aleksandersumowski closed 6 years ago

aleksandersumowski commented 6 years ago

When I trigger extractor I can see the split at the bottom of the terminal for a split second, but then it disappears without a possibility of selecting the snippet.

Not sure what kind of additional information could be useful ...

laktak commented 6 years ago

I guess this could happen if it can't find fzf. Do you have it installed and in your path? Otherwise set the @extrakto_fzf_tool option.

aleksandersumowski commented 6 years ago

I do have fzf within path.

When I execute tmux split-window -v -l 7 /Users/aleksander.sumowski/.tmux/plugins/extrakto/scripts/tmux-extrakto.sh from the zsh prompt it works as expected.

When I execute tmux leader and then split-window -v -l 7 /Users/aleksander.sumowski/.tmux/plugins/extrakto/scripts/tmux-extrakto.sh it doesn't.

laktak commented 6 years ago

Did you try the latest version (see the commit above your comment)? It should pause if it fails.

aleksandersumowski commented 6 years ago

It was about missing fzf missing from the path:

/Users/aleksander.sumowski/.tmux/plugins/extrakto/scripts/tmux-extrakto.sh: line 63: fzf: command not found close failed in file object destructor: sys.excepthook is missing lost sys.stderr error: unable to extract - check/report errors above You can also set the fzf path in options (see readme).

Yet I can see fzf in the PATH and which fzf shows the right one ...

I've tried putting echo $PATH in the script and it outputs a much reduced PATH:

/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin:/usr/local/share/dotnet:/Library/TeX/texbin:/Applications/Wireshark.app/Contents/MacOS

aleksandersumowski commented 6 years ago

When using @extrakto_fzf_tool setting everything works so this is what I'm doing atm as a workaround.

aleksandersumowski commented 6 years ago

I set my path in .zshrc. Before path setting I do:

case $- in i) if [ -z "$TMUX" ]; then exec tmux -2; fi esac

to autostart tmux. Could it be the reason?

laktak commented 6 years ago

I'm glad you found a workaround! Well, I really have no idea why the PATH is different - I'd try to set it early in your .zshrc and check if it helps.

I think though that this is either a problem of tmux and/or your configuration - and not something extrakto could fix. So I'm going to close this issue for now. Please reopen if you find a bug that points in a different direction.