mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-15 06:24:01 +00:00
tests/invocation: Check for tput
This commit is contained in:
parent
e7221a21ef
commit
54438f8dc1
1 changed files with 19 additions and 8 deletions
|
@ -292,6 +292,16 @@ clean_environment
|
||||||
|
|
||||||
# Terminal colouring
|
# Terminal colouring
|
||||||
# Only do this after setting up $TERM.
|
# Only do this after setting up $TERM.
|
||||||
|
term_red=""
|
||||||
|
term_green=""
|
||||||
|
term_yellow=""
|
||||||
|
term_blue=""
|
||||||
|
term_magenta=""
|
||||||
|
term_cyan=""
|
||||||
|
term_white=""
|
||||||
|
term_reset=""
|
||||||
|
# Some systems don't have tput. Disable coloring.
|
||||||
|
if command -v tput >/dev/null 2>&1; then
|
||||||
term_red="$(tput setaf 1)"
|
term_red="$(tput setaf 1)"
|
||||||
term_green="$(tput setaf 2)"
|
term_green="$(tput setaf 2)"
|
||||||
term_yellow="$(tput setaf 3)"
|
term_yellow="$(tput setaf 3)"
|
||||||
|
@ -300,6 +310,7 @@ term_magenta="$(tput setaf 5)"
|
||||||
term_cyan="$(tput setaf 6)"
|
term_cyan="$(tput setaf 6)"
|
||||||
term_white="$(tput setaf 7)"
|
term_white="$(tput setaf 7)"
|
||||||
term_reset="$(tput sgr0)"
|
term_reset="$(tput sgr0)"
|
||||||
|
fi
|
||||||
|
|
||||||
say cyan "Testing shell invocation functionality"
|
say cyan "Testing shell invocation functionality"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue