diff options
| author | Blake Romero <blake@developercraft.com> | 2025-10-27 18:12:50 +0000 |
|---|---|---|
| committer | Blake Romero <blake@developercraft.com> | 2025-10-27 18:12:50 +0000 |
| commit | c2b74a40e396051fa355bf155f28cf60e0cae440 (patch) | |
| tree | 58179ec470af732c205c3a5ac18b6572a2efcc93 /bash_profile | |
| parent | 4d93d06c2cd99d902022ed9f87c8131df2b9bd52 (diff) | |
Add bash_profile
Diffstat (limited to 'bash_profile')
| -rw-r--r-- | bash_profile | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/bash_profile b/bash_profile new file mode 100644 index 0000000..9dc0667 --- /dev/null +++ b/bash_profile @@ -0,0 +1,42 @@ +#!/bin/bash +# +# BASH PROFILE +# + +# Helper Functions +exists() { + command -v $1 >/dev/null 2>&1 +} + +# Custom Scripts +scripts="~/repos/scripts" +[ -d "$scripts" ] && PATH=$PATH:$scripts + +# Node/NPM: make global pkg installs use ~/.local +exists node && export NODE_PATH=~/.local/lib/node_modules:$NODE_PATH +exists npm && export npm_config_prefix=~/.local +export PATH=~/.local/bin:$PATH + +# Editor +if exists vim; then + export EDITOR=vim + export VISUAL=$EDITOR +fi + +# History +export HISTFILE=~/.cache/bash_history + +# Less +export LESS="-R" +export LESSCHARSET=utf-8 +export LESSHISTFILE=~/.cache/less_history +export LESS_TERMCAP_mb=$'\e[01;33m' # begin blinking +export LESS_TERMCAP_md=$'\e[01;33m' # begin bold +export LESS_TERMCAP_me=$'\e[0m' # end all modes +export LESS_TERMCAP_so=$'\e[7m' # start standout mode +export LESS_TERMCAP_se=$'\e[0m' # end standout-mode +export LESS_TERMCAP_us=$'\e[1;37m' # start underlining +export LESS_TERMCAP_ue=$'\e[0m' # end underline + +# Load bashrc +[[ -f ~/.bashrc ]] && source ~/.bashrc |
