home · contact · privacy
Simplify Bash test.
authorChristian Heller <c.heller@plomlompom.de>
Fri, 11 Dec 2015 01:45:04 +0000 (02:45 +0100)
committerChristian Heller <c.heller@plomlompom.de>
Fri, 11 Dec 2015 01:45:04 +0000 (02:45 +0100)
dotfiles_minimal/shinit

index a5a9ee27df2fb1da5c3e0652d807d697a9106848..c80a6bcc148f375d4802382e8be61cfe1be07c78 100644 (file)
@@ -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