dotfiles/bash/.bashrc

32 lines
777 B
Bash

#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
alias ls='ls --color=auto'
PS1='[\u@\h \W]\$ '
# Execute tmux in Alacritty
if [ "$TERM" == "alacritty" ]; then
exec tmux
fi
# Set TERM to screen-256color inside tmux
# (Needs tmux.conf changes)
[[ $TMUX != "" ]] && export TERM="screen-256color"
# SSH without checking or adding host keys to known_hosts
# Useful for cloud server rescue environment & installation
alias sshtmp="ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no'"
alias moshtmp="mosh --ssh=\"ssh -o 'UserKnownHostsFile /dev/null' -o 'StrictHostKeyChecking no'\""
# SSH with automatic "screen"
function sshscr() {
ssh -t $@ screen -RR -d
}
# Add local to path
export PATH="$PATH:~/.local/bin"