Put this in shell init scripts (after iterm2_shell_integration
):
function iterm2_print_user_vars() {
iterm2_set_user_var pathShort "$(iterm2_custom_path_short)"
}
function iterm2_custom_path_short() {
local dir
dir=$(git rev-parse --show-toplevel 2> /dev/null || pwd)