+if [[ $- != *i* ]]
+then
+ # We are being invoked from a non-interactive shell. If this
+ # is an SSH session (as in "ssh host command"), source
+ # /etc/profile so we get PATH and other essential variables.
+ [[ -n "$SSH_CLIENT" ]] && source /etc/profile
+
+ # Don't do anything else.
+ return
+fi
+
+if [ -n "$IS_GUIX_SYSTEM" ]; then
+ # Source the system-wide file.
+ source /etc/bashrc
+fi
+
+# prompt
+# ------
+
+b_prompt() {
+ case $TERM in
+ xterm*)
+ local TITLEBAR='\[\033]0;\h:\w\007\]'
+ ;;
+ *)
+ local TITLEBAR=''
+ ;;
+ esac
+
+ PS1="${TITLEBAR}\
+$([ $(id -u) = "0" ] && printf "\[\e[1;31m\]")\
+: \h:\w\
+$([ -n "$GUIX_ENVIRONMENT" ] && printf " [env]")\
+ ;\
+$([ $(id -u) = "0" ] && printf "\[\e[00m\]")\
+ "
+}
+b_prompt
+
+# cursor
+# ------
+
+# i-beam cursor (uncomment one of the two):
+# echo -e "\033[5 q" # blinking
+# echo -e "\033[6 q" # non-blinking
+
+# general configuration and completions
+# -------------------------------------
+
+# disallow overwriting existing file using redirection
+set -o noclobber
+# append to the history file, don't overwrite it