From 6cabb10b3117851fe12ef92bcf6df9407d5d0e72 Mon Sep 17 00:00:00 2001 From: Fernando Schauenburg Date: Sun, 5 Mar 2023 01:08:40 +0100 Subject: [PATCH] zsh: don't cause errors if `tput` is not available --- config/zsh/.zprofile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/zsh/.zprofile b/config/zsh/.zprofile index f6fb79f..f887978 100644 --- a/config/zsh/.zprofile +++ b/config/zsh/.zprofile @@ -24,7 +24,7 @@ have() { # Make man pages pretty, but only if $TERM is set because otherwise `tput` # would report errors (e.g., when running a command via SSH without allocating # a pty $TERM is not set). -[ -n "$TERM" ] && { +have tput && [ -n "$TERM" ] && { rst="$(tput sgr0)" export LESS_TERMCAP_md="$(printf '%s\n' 'setaf 3' | tput -S)" export LESS_TERMCAP_mb="$LESS_TERMCAP_md"