tmux-plugins / tmux-open

Tmux key bindings for quick opening of a highlighted file or url
MIT License
619 stars 63 forks source link

Remove redirection to /dev/null, fixing OSX open. #34

Closed metakirby5 closed 5 years ago

metakirby5 commented 5 years ago

To my surprise, nothing happened when I tried to use the open functionality. I did some investigation, and it looks like the redirection of output to /dev/null when running the command was somehow causing an issue on OSX. There shouldn't be any issue with removing the redirection since the command runs in the background with -b, so this pull request hopes to resolve the issue in that manner.

bruno- commented 5 years ago

I'm not sure we should remove the redirection as even tmux run-shell -b .. displays the output in copy mode. From man tmux:

With -b, the command is run in the background. After it finishes, any output to stdout is displayed in copy mode.

You can test this by running tmux run -b 'echo foo'.

metakirby5 commented 5 years ago

That's a good point, I hadn't realized that. Oddly enough, I tried adding back in the redirection and open works. Since I can't reproduce the issue anymore, we should probably just close this pull request. -b may still be a worthwhile addition though, so I'll open another pull request for it.