From: Christian Heller Date: Fri, 11 Dec 2015 01:45:04 +0000 (+0100) Subject: Simplify Bash test. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/conditions?a=commitdiff_plain;h=45ad72f3c2b3037e826a285aa443d421ec7f8669;p=config Simplify Bash test. --- diff --git a/dotfiles_minimal/shinit b/dotfiles_minimal/shinit index a5a9ee2..c80a6bc 100644 --- a/dotfiles_minimal/shinit +++ b/dotfiles_minimal/shinit @@ -16,8 +16,7 @@ fi tput_color="$(tput setaf $colornumber)$(tput bold)" tput_reset="$(tput sgr0)" # Bash confuses the line length when not told to not count escape sequences. -which_shell=`lsof -ap $$ -d txt | awk 'NR>1 {print $NF}'` -if [ "${which_shell#*'bash'}" != "$which_shell" ]; then +if [ ! "$BASH" = "" ]; then tput_color="\[$tput_color\]" tput_reset="\[$tput_reset\]" fi