OSX의 tmux 2.0: ~/.tmux.conf가 작동하지 않습니다.

OSX의 tmux 2.0: ~/.tmux.conf가 작동하지 않습니다.

OSX 10.10.5의 homebrew에서 tmux 2.0을 설치했습니다. 기본적으로 구성을 생성하지 않지만 ~/.tmux.conf 파일이 있어야 한다고 조사하여 직접 생성했습니다. iTerm2를 사용하고 있습니다. .

문제는 이 구성 파일에 무엇을 추가하든 tmux에 영향을 미치지 않는다는 것입니다. 그래서 tmux를 다시 시작한 후에도 변경 사항이 없습니다…

내 tmux에 큰 스크롤백 버퍼가 있기를 원합니다.

set -g history-limit 65000

결과가 없다((

이거 멋있게 설치하고싶다tmux 전력선그러나 지침을 정확하게 따른 후에는 아무런 변경 사항도 볼 수 없습니다. 멋진 사용자 정의 라인 대신 표준 tmux 라인만 표시됩니다.전력선 프로젝트Vim 및 프롬프트 라인에서는 작동하지만 내 Tmux 라인은 완전히 무시됩니다…

나의~/.tmux.conf:

### enable mouse: ###
set -g mode-mouse on

### Scrollback buffer ###
set -g history-limit 65000

### Powerline path: ###
#source /usr/local/lib/python2.7/site-packages/powerline/bindings/tmux/powerline.conf

### 256 colour support
#set -g default-terminal "xterm"
set -g default-terminal "screen-256color"

### TMUX-Powerline ###
set-option -g status on
set-option -g status-interval 2
set-option -g status-utf8 on
set-option -g status-justify "centre"
set-option -g status-left-length 60
set-option -g status-right-length 90
set-option -g status-left "#(~/scripts/tmux-powerline/powerline.sh left)"
set-option -g status-right "#(~/scripts/tmux-powerline/powerline.sh right)"

set-window-option -g window-status-current-format "#[fg=colour235, bg=colour27]⮀#[fg=colour255, bg=colour27] #I ⮁ #W #[fg=colour27, bg=colour235]⮀"

내 tmux 또는 구성 파일에 문제가 무엇인지 파악하는 데 도움을 주세요. 감사합니다

답변1

어떤 이유로 tmux는 계속해서 ~/.tmux.conf를 다시 로드하지 exit않았습니다 tmux. 그래서 저는 이 문제를 sudo kill $(pidof tmux). 새로운 tmux 세션을 시작한 후 모두 제대로 작동했습니다.

답변2

tmux 명령을 사용하여 구성을 다시 로드할 수 있습니다.

:source-file ~/.tmux.conf

tmux 명령줄 유형에 액세스하려면 Ctrl + b(또는 접두사가 무엇이든) 뒤에 :.

자세한 내용을 확인하실 수 있습니다여기.

답변3

tmux.tmux.conf오류가 발생하는 줄 아래 의 구성을 무시하는 것 같습니다 . 내 경우에는 전력선 설정 회선이 끊겼고 이후 구성이 적용되지 않았습니다. Python 2.7은 최신 버전의 OSX에 없으므로 아래와 같이 Python3을 사용하여 powerline을 설치해야 했습니다( pip3not 을 사용하고 있음에 유의하세요 pip).

brew install python
pip3 install powerline-status

위의 첫 번째 명령은 Python 3.10을 설치했습니다. 나는 이미 Python 3.9를 가지고 있으므로 첫 번째 줄이 필요하지 않다고 생각합니다.

이것은 아래에 전력선 바인딩을 설치했습니다./Users/{replace_your_user_name}/Library/Python/3.10/lib/python/site-packages/powerline/bindings/

나는 .tmux.conf다음 줄을 추가했습니다.

source '/Users/{replace_your_user_name}/Library/Python/3.10/lib/python/site-packages/powerline/bindings/tmux/powerline.conf'

.powerline-configPATH​이것을 내 항목에 추가한 후에 모두 작동했습니다..zshrc

export PATH=$PATH:/Users/{replace_your_user_name}/Library/Python/3.10/bin

관련 정보