问题
I want to change status bar left message to anything I type.
Just like when I press Ctrl+B F I have this prompt in status bar :
(find-window)
I'd like to press, say Ctrl+B E and have a prompt like :
(status-left)
Then on Enter the text I've typed would be assigned to status-left.
I DON'T want to have to call a shell script that would print the prompt in the shell window and print entered value (is that even possible?), I want the prompt to happen in the status bar itself.
How should I go with that? If i put in my .tmux.conf
:
unbind e
bin e set status-left
It quite understandably prints Empty value message when I press Ctrl+B E
回答1:
command-prompt is probably what you are looking for.
bind-key S command-prompt -p "New Status: " "set -g status-left '%1'"
来源:https://stackoverflow.com/questions/32033091/how-to-have-tmux-prompt-me-for-the-status-left-text-to-display