From d1cec54b3f5f0a9ee87b966433999cdf39c39525 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Tue, 23 May 2017 12:39:46 +0200 Subject: update guixsd setup guixsd specific environment variables are set with bash. After setting up the environment fish is executed. --- guix/bashrc | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 guix/bashrc (limited to 'guix/bashrc') diff --git a/guix/bashrc b/guix/bashrc new file mode 100644 index 0000000..44af031 --- /dev/null +++ b/guix/bashrc @@ -0,0 +1,26 @@ +# Bash initialization for interactive non-login shells and +# for remote shells (info "(bash) Bash Startup Files"). + +# Export 'SHELL' to child processes. Programs such as 'screen' +# honor it and otherwise use /bin/sh. +export SHELL + +if [ -n "$SSH_CLIENT" -a -z "`type -P cat`" ] +then + # We are being invoked from a non-interactive SSH session + # (as in "ssh host command") but 'cat' cannot be found + # in $PATH. Source /etc/profile so we get $PATH and other + # essential variables. + source /etc/profile +fi + +# Adjust the prompt depending on whether we're in 'guix environment'. +if [ -n "$GUIX_ENVIRONMENT" ] +then + PS1='\u@\h \w [env]\$ ' +else + PS1='\u@\h \w\$ ' +fi + +# exec fish +exec fish -- cgit v1.2.3