Y's note

Web技術・プロダクトマネジメント・そして経営について

本ブログの更新を停止しており、今後は下記Noteに記載していきます。
https://note.com/yutakikuchi/

tmux : powerlineの表示ズレを解消する

表示ズレの解消

f:id:yutakikuchi:20180918001843p:plain:w450

@yutakikuchi_です。

ref : tmux 2.5 以降において East Asian Ambiguous Character を全角文字の幅で表示する · GitHub file-tmux-2-7-fix-diff : https://gist.github.com/z80oolong/e65baf0d590f62fab8f4f7c358cbcc34#file-tmux-2-7-fix-diff

上図のようにtmuxのpowerline行がずっと増え続ける問題を解消する。対応方針としてはpatchを当てる。PC環境はMac、tmuxのversionは2.7を想定。patchは上記gistにversion毎にpatchが用意されている。brew edit tmuxコマンドで下記内容を追記し、brew reinstallにてpatchを適用し再度install。

// コマンドは下記を実行
$ tmux -V
tmux 2.7

$ brew edit tmux

// 下記を追記
  def patches
     [
       "https://gist.githubusercontent.com/z80oolong/e65baf0d590f62fab8f4f7c358cbcc34/raw/d478a099aa5074e932e3323e9b16033e13919cdf/tmux-2.7-fix.diff"
     ]
  end

$ brew reinstall --build-from-source tmux
==> Summary
🍺  /usr/local/Cellar/tmux/2.7: 10 files, 705.2KB, built in 29 seconds