config/bash/.bashrc

98 lines
2.5 KiB
Bash
Raw Permalink Normal View History

# ~/.bashrc: executed by bash(1) for non-login shells.
# We source it in ~/.profile so that it is used for _all_ shells.
# Don't do anything if the shell isn't interactive
case $- in
*i*) ;;
*) return;;
esac
# don't put duplicates or lines starting with a space in the history.
HISTCONTROL=ignoreboth
# store a long history
export HISTSIZE=1000000
export HISTFILESIZE=10000000
# set the correct editor to open automatically
export EDITOR=nvim
# append to the history file rather than overwriting it
shopt -s histappend
export PROMPT_COMMAND="history -a; $PROMPT_COMMAND"
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# all my terminals support color so let's colorize this alllllll
PS1="\[\e[33m\][\t] \`if [[ \$? = '0' ]]; then echo \"\[\e[0;32m\]\"; else echo \"\[\e[0;31m\]\"; fi\`\u@\h\[\e[0m\]> "
# modify the title bar, too
PS1="\[\e]0;\u@\h: \w\a\]$PS1"
# 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
2022-05-21 14:24:14 +00:00
alias vim="nvim"
2022-05-06 15:07:31 +00:00
function vim-new {
rm -f Session.vim
vim -c "Obsession"
}
2022-09-28 13:16:38 +00:00
function vim-resume {
if test -f "Session.vim"; then
vim -S Session.vim
else
vim -c "Obsession"
fi
}
2023-08-28 01:52:04 +00:00
alias vim-res="vim-resume"
alias vn="vim-new"
alias vr="vim-resume"
2023-09-15 16:19:16 +00:00
alias talon="~/Install/talon/run.sh"
2023-08-28 01:52:04 +00:00
# enable programmable completion features
if ! shopt -oq posix; then
if [ -f /usr/share/bash-completion/bash_completion ]; then
. /usr/share/bash-completion/bash_completion
elif [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
fi
2021-09-11 22:04:27 +00:00
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# set PATH so it includes user's private bin if it exists
if [ -d "$HOME/.local/bin" ] ; then
PATH="$HOME/.local/bin:$PATH"
fi
if [ -d "/usr/local/go/bin" ] ; then
PATH=$PATH:/usr/local/go/bin
fi
2021-09-11 22:04:27 +00:00
# Add rustup and the standard rust tooling to the path
. "$HOME/.cargo/env"
# set path so it includes fly bin if it exists
if [ -d "$HOME/.fly" ] ; then
FLYCTL_INSTALL="$HOME/.fly"
PATH="$FLYCTL_INSTALL/bin:$PATH"
fi
2024-02-27 03:21:40 +00:00
source ~/.local/share/blesh/ble.sh
2024-02-27 03:21:40 +00:00
eval "$(atuin init bash)"