traewelling: only output colors when allowed
This commit is contained in:
parent
7089e94f21
commit
611bb49a50
1 changed files with 3 additions and 1 deletions
|
@ -4,7 +4,9 @@ pkgs.writeShellScriptBin "traewelling" ''
|
|||
#!/bin/sh
|
||||
|
||||
function color() {
|
||||
echo -ne "\e[38;5;$1"m
|
||||
if test -t 1 ; then
|
||||
echo -ne "\e[38;5;$1"m
|
||||
fi
|
||||
}
|
||||
function j() {
|
||||
jq -r $1 <<< "$json"
|
||||
|
|
Loading…
Add table
Reference in a new issue