zsh check for dumb terminal at first

This commit is contained in:
Yannik Buerkle 2024-05-27 11:16:53 +02:00
parent d13a607aac
commit d06e22d31c

9
.zshrc
View file

@ -1,7 +1,9 @@
[[ $TERM == "dumb" ]] && unsetopt zle && PS1='$ ' && return
# Enable Powerlevel10k instant prompt. Should stay close to the top of ~/.zshrc.
# Initialization code that may require console input (password prompts, [y/n]
# confirmations, etc.) must go above this block; everything else may go below.
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]] && [ "$TERM" != "dumb" ]; then
if [[ -r "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh" ]]; then
source "${XDG_CACHE_HOME:-$HOME/.cache}/p10k-instant-prompt-${(%):-%n}.zsh"
fi
@ -22,11 +24,6 @@ export RUSTUP_HOME="$XDG_DATA_HOME/rustup"
export GTK2_RC_FILES="$XDG_CONFIG_HOME/gtk-2.0/gtkrc"
export LESSHISTFILE="$XDG_STATE_HOME/less/history"
if [ "$TERM" = "dumb" ]; then
PS1="> "
exit 0
fi
# Set the directory we want to install Zinit and plugins
ZINIT_HOME="${XDG_DATA_HOME:-${HOME}/.local/share}/zinit/zinit.git"