diff options
author | Amin Bandali <bandali@gnu.org> | 2019-04-14 15:36:58 -0400 |
---|---|---|
committer | Amin Bandali <bandali@gnu.org> | 2019-04-14 15:36:58 -0400 |
commit | d99f86cd913e15a2dc5792ca382fb5d4b2abeb7b (patch) | |
tree | 097c1014a250822e3671aaf26810b959d91b58a0 /.bash_profile | |
parent | edb9a03a2fb953b707f286a6d944e6cf0b8fae82 (diff) | |
download | configs-d99f86cd913e15a2dc5792ca382fb5d4b2abeb7b.tar.gz configs-d99f86cd913e15a2dc5792ca382fb5d4b2abeb7b.tar.xz configs-d99f86cd913e15a2dc5792ca382fb5d4b2abeb7b.zip |
bash: various tweaks
- new include helper for checking if arg is a regular and readable
file, then sourcing it
- set VISUAL editor
- fix prompt to show an additional character when abbreviated folder’s
name starts with a dot
Diffstat (limited to '.bash_profile')
-rw-r--r-- | .bash_profile | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/.bash_profile b/.bash_profile index d5f7cc9..f41056d 100644 --- a/.bash_profile +++ b/.bash_profile @@ -1,2 +1,7 @@ -[[ -f ~/.profile ]] && . ~/.profile -[[ -f ~/.bashrc ]] && . ~/.bashrc +include () { + [[ -f "$1" && -r "$1" ]] && source "$1" +} + +include ~/.profile +include ~/.nix-profile/etc/profile.d/nix.sh +include ~/.bashrc |