Fix external tmux command without display #1605
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I spent entirely too long today fixing my own instance of #1560, because I'm not running alot in X11 and #460 and 2a7d1fd make alot simply fall back to non-spawning behaviour silently.
Initially I special-cased tmux outside of X11 in alot/commands/globals.py, but then I found out that I'm supposed to write a hook. So I did that, but I'd like to document it publicly.
There's also a bug where the
thread
result of that hook is not respected becauseself.in_thread
gets set directly.thread
result of thetouch_external_command
hook is not overridden.touch_external_command
hook and corresponding shell script for tmux outside of X11. (Thanks to @cjpbirkbeck in Edit mail in a different terminal tabs than the main alot windows #1560 (comment))