From db557e4b31cb75e8cd6f08fc756a06680ea72f8b Mon Sep 17 00:00:00 2001 From: Jan De Dobbeleer Date: Tue, 31 Jan 2023 18:41:20 +0100 Subject: [PATCH] fix(warp): do not get cursor position resolves #3431 --- src/shell/scripts/omp.bash | 2 +- src/shell/scripts/omp.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shell/scripts/omp.bash b/src/shell/scripts/omp.bash index 8c5c5ba4..a2f30af2 100644 --- a/src/shell/scripts/omp.bash +++ b/src/shell/scripts/omp.bash @@ -12,7 +12,7 @@ PS2="$(::OMP:: print secondary --config="$POSH_THEME" --shell=bash --shell-versi function _set_posh_cursor_position() { # not supported in Midnight Commander # see https://github.com/JanDeDobbeleer/oh-my-posh/issues/3415 - if [[ -v MC_SID ]];then + if [[ -v MC_SID ]] || [[ $TERM_PROGRAM == "WarpTerminal" ]]; then return fi local pos diff --git a/src/shell/scripts/omp.zsh b/src/shell/scripts/omp.zsh index f961a9e2..b35b90e9 100644 --- a/src/shell/scripts/omp.zsh +++ b/src/shell/scripts/omp.zsh @@ -10,7 +10,7 @@ PS2="$(::OMP:: print secondary --config="$POSH_THEME" --shell=zsh)" function _set_posh_cursor_position() { # not supported in Midnight Commander # see https://github.com/JanDeDobbeleer/oh-my-posh/issues/3415 - if [[ -v MC_SID ]];then + if [[ -v MC_SID ]] || [[ $TERM_PROGRAM == "WarpTerminal" ]]; then return fi local pos