Complete Computing Environment: Shell Configuration

Table of Contents

BASh

There's not much here right now, since I'm not a huge user of the shell. Instead, I opt to wrap most repetitive things in Emacs commands. As such, I opt for a very light configuration over the top of bash to provide enough affordances to make it useful.

Bash Configuration Loader

It's possible for multiple CCE modules to push out Bash configurations, so each one tangles to its own file which is then executed as so:

for file in ~/.bashrc.d/*; do
  . $file
done
for file in ~/.bash_profile.d/*; do
  . $file
done
readlink ~/.bashrc.d || link-this $PWD/out/bashrc.d/ ~/.bashrc.d
readlink ~/.bash_profile.d || link-this $PWD/out/bash_profile.d/ ~/.bash_profile.d
link-this $PWD/out/bashrc ~/.bashrc
link-this $PWD/out/bash_profile ~/.bash_profile
export PATH=$PATH:~/bin/

test -f /etc/bash_profile && . /etc/bash_profile

I am in San Francisco. This used to be a UTC setup, but it's really hard to make that work sanely, so I don't.

export TZ=America/Los_Angeles
export PS1="\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w \[\033[00m\]\`if [ \$? == 0 ]; then echo \:\); else echo \:\(; fi\` "
test -f /etc/bashrc && . /etc/bashrc

Author: Ryan Rix

Created: 2017-07-02 Sun 11:26

Validate XHTML 1.0