This solved my issue with power10k + zsh.
Here is a guide:
- run
curl -L https://iterm2.com/shell_integration/zsh -o ~/.iterm2_shell_integration.zsh
- on your .zshrc add (
nano ~/.zshrc
)
PROMPT_EOL_MARK=""
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
precmd() {
print -Pn "\e]133;D;%?\a"
}
preexec() {
print -Pn "\e]133;C;\a"
}
- (not sure it’s necessary) In iTerm2 enable shell integration by enabling Load shell integration automatically in Settings > Profiles > General in the Command section
- reload configuration
source ~/.zshrc
- restart cursor