diff --git a/configs/shells/bash/.bashrc b/configs/shells/bash/.bashrc index 2529451..9b5f2f8 100644 --- a/configs/shells/bash/.bashrc +++ b/configs/shells/bash/.bashrc @@ -1,12 +1,12 @@ # This is a somewhat hacky bashrc that is used to provide some of the conveniences from my zshrc on machines that I can't get zsh on export EWCONFIG_ROOT="$HOME/.config/ewconfig" -# Load macros -. $EWCONFIG_ROOT/configs/shells/bash/macros.sh - # Show some host info . $EWCONFIG_ROOT/configs/shells/bash/info.sh +# Load macros +. $EWCONFIG_ROOT/configs/shells/bash/macros.sh + # I always want my ~/bin to be in my PATH export PATH="$HOME/bin:$PATH" export PATH="$EWCONFIG_ROOT/configs/scripts:$PATH" diff --git a/configs/shells/bash/info.sh b/configs/shells/bash/info.sh index dea0843..dc63aa5 100644 --- a/configs/shells/bash/info.sh +++ b/configs/shells/bash/info.sh @@ -9,10 +9,14 @@ elif [ -n "$ZSH_VERSION" ]; then green="$fg[green]" fi -# If `uname -s` is a BSD -if [ $(uname -s | grep -c BSD) -gt 0 ]; then +# Different OSes have different ways of displaying info +if [ $(uname -s | grep -c BSD) -gt 0 ]; then # BSD echo -e "${green}Platform:$reset_color $(uname -s) $(uname -r) $(uname -p)" -else # Linux + +elif [ $(uname -s | grep -c Msys) -gt 0 ]; then # Windows + echo -e "${green}Platform:$reset_color $(uname -o) $(uname -r)" + +else # Linux-y things echo -e "${green}Platform:$reset_color $(uname -o) $(uname -r)" echo -e "${green}Uptime:$reset_color $(uptime -p)" fi