문제

C-b: gives you tmux command prompt.
Is there a way to scroll through the commands entered on it previously?
Up arrow or Ctrl p/n don't seem to work.

도움이 되었습니까?

해결책

Up and Down work in the default (Emacs) mode; if however, you have set vi-mode then you will need to either explicitly enter command mode (by pressing Escape once at tmux's command prompt—Ctrlb,:), or you can create keybinds for those commands in your .tmux.conf, thereby removing the need to change modes:

set -g status-keys vi
bind-key -t vi-edit Up   history-up
bind-key -t vi-edit Down history-down

Tmux's default bindings can be seen with Ctrlb,: and then entering lsk -t vi-edit. The defaults are, in this case:

bind-key -ct vi-edit   Up   history-up
bind-key -ct vi-edit   Down history-down

Note the -ct switch for command mode.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top