Folder icon in titlebar for iTerm2

iterm

macOS's default terminal shows the current directory as an icon in the titlebar (called a proxy icon). I can use it to navigate up, or drag the icon to another window to insert the path.

Is there a way to get this icon with iTerm2?

I tried to use various escape sequences, but the best I could to is to get the title set to the current path, but no icon.

Best Answer

Nevermind, found it myself. I updated to version 3.1.beta.5, and the option was under Preferences - Appearance - Window - Show proxy icon in window title bar.

You have to install the shell integrations, or manually send the required ANSI sequences. The default macOS bashrc only sends the sequences to set the icon when it detects Terminal.app.