2023-03-01 17:18:32 +00:00
|
|
|
# vim: ft=sh
|
|
|
|
# Source global definitions
|
|
|
|
if [ -f /etc/bashrc ]; then
|
|
|
|
. /etc/bashrc
|
|
|
|
fi
|
|
|
|
|
|
|
|
# set PATH so it includes user's private bin if it exists
|
|
|
|
grep "$HOME/.local/bin" "$PATH" > /dev/null 2>&1 || export PATH="$HOME/.local/bin:$PATH"
|
|
|
|
|
2023-03-04 09:08:14 +00:00
|
|
|
# set PATH so it includes homebrew bin directories if they exist
|
|
|
|
HOMEBREW_BIN="/opt/homebrew/bin"
|
|
|
|
HOMEBREW_SBIN="/opt/homebrew/sbin"
|
|
|
|
grep "$HOMEBREW_SBIN" "$PATH" > /dev/null 2>&1 || export PATH="$HOMEBREW_SBIN:$PATH"
|
|
|
|
grep "$HOMEBREW_BIN" "$PATH" > /dev/null 2>&1 || export PATH="$HOMEBREW_BIN:$PATH"
|
|
|
|
|
2023-03-01 17:18:32 +00:00
|
|
|
# enable color support of ls and also add handy aliases
|
|
|
|
if [ -x /usr/bin/dircolors ]; then
|
|
|
|
test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
|
|
|
|
alias ls='ls --color=auto'
|
|
|
|
alias dir='dir --color=auto'
|
|
|
|
alias vdir='vdir --color=auto'
|
|
|
|
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
fi
|
|
|
|
|
|
|
|
# colored GCC warnings and errors
|
|
|
|
export GCC_COLORS='error=01;31:warning=01;35:note=01;36:caret=01;32:locus=01:quote=01'
|
|
|
|
|
|
|
|
# set LANG to be something sensible
|
|
|
|
export LANG="en_GB.utf-8"
|
|
|
|
|
|
|
|
# some more ls aliases
|
|
|
|
alias ll='ls -alF'
|
|
|
|
alias la='ls -A'
|
|
|
|
alias l='ls -CF'
|
|
|
|
|
2023-03-01 17:48:45 +00:00
|
|
|
command -v nvim > /dev/null 2>&1 && export EDITOR=nvim || export EDITOR=vi
|
|
|
|
command -v xed > /dev/null 2>&1 && export VISUAL=xed || export VISUAL=vi
|
2023-03-01 17:18:32 +00:00
|
|
|
|
2023-03-04 09:08:14 +00:00
|
|
|
alias lg="lazygit"
|
|
|
|
alias nvimdiff="nvim -d"
|
|
|
|
alias vim="nvim"
|
|
|
|
alias vimdiff="nvim -d"
|
|
|
|
|
2023-03-02 10:21:33 +00:00
|
|
|
if [ -f "$HOME/.bashrc.local" ] ; then
|
2023-03-01 17:18:32 +00:00
|
|
|
source "$HOME/.bashrc.local"
|
|
|
|
fi
|
|
|
|
|
2023-03-02 10:21:33 +00:00
|
|
|
export PYENV_ROOT="$HOME/.pyenv"
|
|
|
|
command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"
|
2023-03-16 10:54:06 +00:00
|
|
|
|
2023-03-02 10:21:33 +00:00
|
|
|
command -v direnv > /dev/null 2>&1 && eval "$(direnv hook bash)"
|
|
|
|
command -v starship > /dev/null 2>&1 && eval "$(starship init bash)"
|
2023-03-06 13:51:33 +00:00
|
|
|
|
2023-03-14 10:37:56 +00:00
|
|
|
command -v glab > /dev/null && source <(glab completion -s bash)
|
|
|
|
command -v gh > /dev/null && source <(gh completion -s bash)
|