From 5779d99a818bac5066704a46e42ba0dda055da20 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Wed, 16 Jan 2019 10:50:08 +0100 Subject: [PATCH] fish_vi_cursor: Check for tput before using If tput isn't available, that's the same as if it failed. This is the last bit necessary to make the tests work on alpine on builds.sr.ht. --- share/functions/fish_vi_cursor.fish | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/functions/fish_vi_cursor.fish b/share/functions/fish_vi_cursor.fish index 27a20083f..d503f934f 100644 --- a/share/functions/fish_vi_cursor.fish +++ b/share/functions/fish_vi_cursor.fish @@ -32,7 +32,7 @@ function fish_vi_cursor -d 'Set cursor shape for different vi modes' # We use the `tput` here just to see if terminfo thinks we can change the cursor. # We cannot use that sequence directly as it's not the correct one for konsole and iTerm, # and because we may want to change the cursor even though terminfo says we can't (tmux). - if not tput Ss >/dev/null 2>/dev/null + if begin; not command -sq tput; or not tput Ss >/dev/null 2>/dev/null; end # Whitelist tmux... and not begin set -q TMUX