alias only in terminal

This commit is contained in:
Radovan Garabík 2021-07-06 17:37:37 +02:00
parent 9dd0d18f62
commit 64c1ba6a0d
2 changed files with 2 additions and 2 deletions

2
grc.sh
View File

@ -1,5 +1,5 @@
GRC="$(which grc)"
if [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
if tty -s && [ -n "$TERM" ] && [ "$TERM" != dumb ] && [ -n "$GRC" ]; then
alias colourify="$GRC -es"
alias blkid='colourify blkid'
alias configure='colourify ./configure'

View File

@ -1,6 +1,6 @@
#!/usr/bin/env zsh
if [ "$TERM" = dumb ] || (( ! $+commands[grc] ))
if ! tty -s || [ ! -n "$TERM" ] || [ "$TERM" = dumb ] || (( ! $+commands[grc] ))
then
return
fi