From e11d583d8c106ff97fd461e41382d4b828fabcb1 Mon Sep 17 00:00:00 2001 From: creme Date: Sat, 4 Jan 2020 21:53:25 +0100 Subject: [PATCH] we can make .profile a bit shorter --- .profile | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/.profile b/.profile index 7be79a1..7a9044f 100644 --- a/.profile +++ b/.profile @@ -11,20 +11,14 @@ # if running bash if [ -n "$BASH_VERSION" ]; then # include .bashrc if it exists - if [ -f "$HOME/.bashrc" ]; then - . "$HOME/.bashrc" - fi + [ -f "$HOME/.bashrc" ] && . "$HOME/.bashrc" fi # set PATH so it includes user's private bin if it exists -if [ -d "$HOME/bin" ] ; then - PATH="$HOME/bin:$PATH" -fi +[ -d "$HOME/bin" ] && PATH="$HOME/bin:$PATH" # set PATH so it includes user's private bin if it exists -if [ -d "$HOME/.local/bin" ] ; then - PATH="$HOME/.local/bin:$PATH" -fi +[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH" ## defaults ## @@ -38,6 +32,7 @@ export BBJ_USER=$USER export GOROOT=/usr/local/go export PATH=$GOROOT/bin:$PATH + if [[ ! $TERM =~ screen ]] || [[ ! $TMUX =~ tmux ]]; then _byobu_sourced=1 . /usr/bin/byobu-launch 2>/dev/null || true # when we use `byobu-disable` we have an emtpy if..