From bebbc9bb1c32f3f460ca6d6e81446fcc996dc9d6 Mon Sep 17 00:00:00 2001 From: Tom Ryder Date: Thu, 20 Jun 2013 22:51:35 +1200 Subject: Massive overhaul of structure for Bash files * No longer using .bash_logout * No longer using .bash_profile, using POSIX-compliant .profile * instead; in particular, moved most of environment settings into .profile * Moved some of the separable functionality of both .profile and .bashrc into subdirectories (some scripts shared, some not) * Tidied implementation of ls/grep aliases * Updated install script to reflect all of the above --- sh/profile | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 sh/profile (limited to 'sh') diff --git a/sh/profile b/sh/profile new file mode 100644 index 00000000..eb2b7e8f --- /dev/null +++ b/sh/profile @@ -0,0 +1,23 @@ +# Set editor +export EDITOR='vi' +export VISUAL="$EDITOR" + +# Set pager +export PAGER='less' + +# Add ~/.local/bin to PATH +[ -d "$HOME/.local/bin" ] && PATH="$HOME/.local/bin:$PATH" +export PATH + +# Load any supplementary scripts +if [[ -d "$HOME/.profile.d" ]] +then + for file in $HOME/.profile.d/* + do + . $file + done +fi + +# If running Bash, try to run .bashrc +[ -n "$BASH" ] && [ -e "$HOME/.bashrc" ] && . $HOME/.bashrc + -- cgit v1.2.3