diff --git a/common/.profile.d/20-functions.sh b/common/.profile.d/20-functions.sh index 3cc7dfe..5c81c2e 100644 --- a/common/.profile.d/20-functions.sh +++ b/common/.profile.d/20-functions.sh @@ -78,5 +78,5 @@ debug() login_shell() { - [[ $- == *i* ]] + [ "$-" = "*i*" ] } diff --git a/common/.profile.d/99-alias.sh b/common/.profile.d/99-alias.sh index 94f0e48..5fdfd12 100644 --- a/common/.profile.d/99-alias.sh +++ b/common/.profile.d/99-alias.sh @@ -7,5 +7,11 @@ alias n=noglob alias l=ls alias L='ls -dal' alias cleandir="find . -type f \( -name '*~' -o -name '#*#' -o -name '.*~' -o -name '.#*#' -o -name 'core' -o -name 'dead.letter*' \) | grep -v auto-save-list | xargs -t rm" + +# Prefer less for paging duties. which less > /dev/null 2>&1 -[ $? = 0 ] && alias T='less -f +F' || alias T='tail -f' +if [ $? -eq 0 ]; then + alias T="\$(which less) -f +F" +else + alias T="\$(which tail) -f" +fi