FunTester
FunTester
Jan 7, 2026 · Fundamentals

Auto-Update iTerm2 Badge with Zsh to Show Current Directory

This guide explains how to configure iTerm2's badge to automatically display the current folder name and update instantly when you change directories, using a simple Zsh hook and Base64‑encoded OSC 1337 control sequences.

AutomationBadgeiTerm2
0 likes · 6 min read
Auto-Update iTerm2 Badge with Zsh to Show Current Directory