Add zshrc and refactor shell configration

This commit is contained in:
Daniel McKnight 2025-05-29 21:20:03 -07:00
parent e23e66f801
commit 660a6e8eb5
4 changed files with 149 additions and 11 deletions

15
.bashrc
View file

@ -147,6 +147,10 @@ fi
# Customizations
if [ -f ~/.profile ]; then
. ~/.profile
fi
# Use tmux for local unelevated shells
if [ -z "${SUDO_USER}" ] && [ -z "${SSH_CONNECTION}" ] && [ -z "${TERM_PROGRAM}" ]; then
tmux new -A -s local_tmux
@ -161,15 +165,10 @@ if [ $(which nvim) ]; then
fi
# Kubernetes
alias k9=k9s
which kubectl 1> /dev/null && source <(kubectl completion bash)
which helm 1> /dev/null && source <(helm completion bash)
[ -d "${KREW_ROOT:-$HOME/.krew}/bin" ] && export PATH="${KREW_ROOT:-$HOME/.krew}/bin:$PATH"
# Helpful Aliases
alias rsync="rsync -e 'ssh -o RemoteCommand=none'"
alias sudosu="sudo bash --rcfile ~/.bashrc"
if [ -n "${SUDO_USER}" ]; then
alias nano="nano --rcfile \"/home/${SUDO_USER}/.nanorc\""
fi
@ -178,12 +177,6 @@ fi
shopt -s histverify
PROMPT_COMMAND="${PROMPT_COMMAND};history -a"
# Cargo binary path
[ -d "${HOME}/.cargo/bin" ] && export PATH="${PATH}:${HOME}/.cargo/bin"
# Funciton to notify after a long-running command
alias bell="echo -e '\a'"
# Apply local .bashrc to remote ssh session
ssh-custom() {
remote_file=$(mktemp)