From 468e3de0842b7fbc4549557e1d261163be686582 Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 7 Jun 2023 07:53:44 +0200 Subject: zsh: fix broken prompt detection when using ssh --- user/settings/zsh.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/user/settings/zsh.nix b/user/settings/zsh.nix index 4ae24110..22899397 100644 --- a/user/settings/zsh.nix +++ b/user/settings/zsh.nix @@ -209,10 +209,13 @@ in ''; initExtraFirst = '' - if [[ -r "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then - source "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" + if [[ $TERM != "dumb" ]] + then + if [[ -r "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" ]]; then + source "${config.xdg.cacheHome}/p10k-instant-prompt-''${(%):-%n}.zsh" + fi + typeset -g POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true fi - typeset -g POWERLEVEL9K_DISABLE_CONFIGURATION_WIZARD=true ''; initExtra = '' -- cgit 1.4.1