config-files/.bashrc

46 lines
1.1 KiB
Bash
Raw Permalink Normal View History

2022-12-11 11:07:30 -05:00
#
# ~/.bashrc
#
2020-11-10 20:00:15 -05:00
2023-02-08 11:16:16 -05:00
export MANPAGER="sh -c 'col -bx | bat -l man -p'"
2022-12-11 11:07:30 -05:00
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
2020-11-10 20:00:15 -05:00
2022-12-11 11:07:30 -05:00
# ls aliases
2023-09-26 12:24:54 -04:00
alias ls='eza --color=auto'
alias sl='eza --color=auto'
alias ll='eza -la --color=auto'
2020-11-10 20:00:15 -05:00
2022-12-11 11:07:30 -05:00
# git aliases
2023-04-20 09:04:44 -04:00
alias gss='git status'
2022-12-11 11:07:30 -05:00
alias gcm='git commit -m'
2023-09-26 12:24:54 -04:00
alias cf='git --git-dir=$HOME/config-files/ --work-tree=$HOME'
2020-11-10 20:00:15 -05:00
2022-12-11 11:07:30 -05:00
# aliases
alias ..='cd ..'
2023-02-08 11:16:16 -05:00
alias vi='vim'
alias ip='ip -color=auto'
2022-12-11 11:07:30 -05:00
# starship prompt
eval "$(starship init bash)"
2023-02-08 11:16:16 -05:00
colorscript -e roshar
case ${TERM} in
xterm*|rxvt*|alacritty*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
2024-06-13 19:09:36 -04:00
if [[ $(ps --no-header --pid=$PPID --format=comm) != "fish" && -z ${BASH_EXECUTION_STRING} ]]
then
shopt -q login_shell && LOGIN_OPTION='--login' || LOGIN_OPTION=''
exec fish $LOGIN_OPTION
fi