From 662ef16a7b28e939ace1b8d62ca9041921f06ea2 Mon Sep 17 00:00:00 2001 From: frosty Date: Fri, 4 Jul 2025 07:02:58 -0400 Subject: add bash --- .bashrc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .bashrc (limited to '.bashrc') diff --git a/.bashrc b/.bashrc new file mode 100644 index 0000000..335fce6 --- /dev/null +++ b/.bashrc @@ -0,0 +1,25 @@ +# shellcheck shell=bash + +[[ $- != *i* ]] && return + +__has() { hash "$1" 2>/dev/null; } + +HISTSIZE= +HISTCONTROL="erasedups:ignorespace" +HISTFILE="$XDG_STATE_HOME/bash/history" + +PS1='\u@\h:\w\$ ' + +alias g='git' +alias t='tmux' + +__has nvim && alias vim='nvim' +__has vim && alias vi='vim' +alias doas='doas ' +alias sudo='sudo ' + +alias ls='ls --color=auto -AF' +alias grep='grep --color=auto' + +[[ ! -d "$(dirname "$HISTFILE")" ]] && mkdir -p "$(dirname "$HISTFILE")" +unset __has -- cgit v1.2.3