comparison .bashrc @ 265:df0b24d4fabd

Think I'm ready to check this all in now; shared dotfiles that can be "sent" through an SSH connection to be used and cleaned up when finished.
author Steve Huston <huston@srhuston.net>
date Wed, 24 Apr 2024 16:15:40 -0400
parents 15543c169f36
children f62fb9579277
comparison
equal deleted inserted replaced
264:bb69763716a7 265:df0b24d4fabd
15 # Source global definitions 15 # Source global definitions
16 if [ -f /etc/bashrc ]; then 16 if [ -f /etc/bashrc ]; then
17 . /etc/bashrc 17 . /etc/bashrc
18 fi 18 fi
19 19
20 # User specific aliases and functions 20 # DOTHOME is where dotfiles (like this one) live that might be used here, or
21 # might be shared to other places from here, so rather than duplicate them we
22 # put them in a subdirectory that is safe to "export" but will need to know
23 # where they live. Then if imported somewhere else, that location may be
24 # different than here - like in a temporary directory - so we'll need to know
25 # what it is and refer to it as such. The equivalent script to this very one
26 # that would load those files will have to set this first.
27
28 export DOTHOME="$HOME/.shared"
29
30 # Source shared files
31 if [ -f ${DOTHOME}/shared_bashrc ]; then
32 . ${DOTHOME}/shared_bashrc
33 fi
34
35 # Load local aliases
21 if [ -f $HOME/.bash_aliases ]; then 36 if [ -f $HOME/.bash_aliases ]; then
22 . $HOME/.bash_aliases 37 . $HOME/.bash_aliases
23 fi 38 fi
24 39
25 # 40 #
26 # Environment variables 41 # Environment variables
27 # 42 #
28 43
29 [[ "$PS1" ]] && . $HOME/.bash_prompt
30
31 export PAGER=less
32 export EDITOR=vim
33 export RUBYLIB=$HOME/Installs/rubygems/lib 44 export RUBYLIB=$HOME/Installs/rubygems/lib
34 export GEM_HOME=$HOME/Installs/rubygems/gems 45 export GEM_HOME=$HOME/Installs/rubygems/gems
35 export TOMENET_PATH=$HOME/Installs/tomenet/lib/ 46 export TOMENET_PATH=$HOME/Installs/tomenet/lib/
36 export HOST=`hostname -s`
37 # Since I've started playing with some node.js things, this is included in its 47 # Since I've started playing with some node.js things, this is included in its
38 # setup. 48 # setup.
39 export NVM_DIR="$HOME/.config/nvm" 49 export NVM_DIR="$HOME/.config/nvm"
40 50
41 if [ -f $HOME/.screen/$HOST ]; then 51 if [ -f $HOME/.screen/$HOST ]; then
52 # If we have a local one for this host, use it; if not the default set in
53 # the shared settings will be there
42 export SCREENRC=$HOME/.screen/$HOST 54 export SCREENRC=$HOME/.screen/$HOST
43 fi 55 fi
44
45 # Specifically, to hell with this one
46 [[ $TERM =~ screen.xterm-256color ]] && export TERM=screen-256color
47 56
48 # Set some friendly options for history 57 # Set some friendly options for history
49 # Append to ~/.bash_history, don't overwrite it 58 # Append to ~/.bash_history, don't overwrite it
50 shopt -s histappend 59 shopt -s histappend
51 # Set the history a bit larger, both on disk and in memory 60 # Set the history a bit larger, both on disk and in memory