2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

iTerm2 の shell integration で文字拡大できなくなった時の対処

Last updated at Posted at 2024-03-26

はじめに

iTerm2 の文字を拡大するショートカット 「 Command+ "+" 」 にて、拡大する代わりに以下のダイアログが出て、邪魔される事がありました。その対処メモです。

Shell Integration の Install

Shell Integration をインストールするまで何度でもこのダイアログが出て、拡大できません。観念して一旦インストールします。(Cancel もしくは No Need 的なボタンがないんですよね。。)

すると、Command + "+" で、以下のようなヒストリー(?)がポップアップ表示されるようになります。

スクリーンショット 2024-03-26 16.33.19.png

Shell Integration の無効化

ちなみに、Shell Integraion の Install を実行すると、ログイン先の $HOME に以下のファイルが展開されます。

% ls .iterm2*
.iterm2_shell_integration.bash

.iterm2:
imgcat		it2attention	it2dl		it2profile	it2tip
imgls		it2check	it2getvar	it2setcolor	it2ul
it2api		it2copy		it2git		it2setkeylabel	it2universion

このうち .iterm2_shell_integration.bash を削除するか、別の名前に変えることで、無効化できるようです。(zsh を使っている場合は、これの zsh 版で同様の操作すれば OK のはず)

% mv .iterm2_shell_integration.bash .iterm2_shell_integration.bash_

この後、iTerm2 アプリを一旦終了させます。
グローバルメニューの Quic iTerm2 もしくはドックのアイコンから 終了から実行可能です。
(なお、端末のウィンドウだけ終了させても駄目なようです)

global menu dock icon menu
スクリーンショット 2024-03-26 16.45.06.png スクリーンショット 2024-03-26 16.45.20.png

この後、iTerm2 を起動し直せば、Command + "+" での文字拡大機能が復活します。

参考URL

Look in your ~/.profile, ~/.bash_profile, ~/.login, ~/.zshrc, or ~/.config/fish/config.fish (which file it's in depends on what shell you use) for a line like this:

test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"

And remove it.
2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?