basyura's blog

あしたになったらほんきだす。

wezterm : title 判定

wezterm で分割した pane で Vim を表示している判定が家 Mac だと動いていたのに、会社 Windows + Git Bash では動かなくて再調査。

$ wezterm cli list --format json | \
      jq -r '.[] | "\(.pane_id)\ttitle=\(.title // "")"'

2       title=zsh
3       title=Vim
6       title=Vim

家 Mac では title で判定できていたけど、Git Bash では title が取れていなかった。

if has('unix')
  set title
  set titlestring = "vim"
endif

と定義することで解決。title が取れなくて vim ではなく sh と判断されていた。