summaryrefslogtreecommitdiff
path: root/.bashrc
diff options
context:
space:
mode:
Diffstat (limited to '.bashrc')
-rw-r--r--.bashrc25
1 files changed, 25 insertions, 0 deletions
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