-
Notifications
You must be signed in to change notification settings - Fork 0
/
.bashrc
48 lines (40 loc) · 920 Bytes
/
.bashrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
# this file needs to be sourced by
# "~/.bash_profile" or "~/.profile"
# dont run anything if not interactive
[[ $- != *i* ]] && return
# we don't want a bell
bind 'set bell-style none'
# out of the way
export HISTFILE=$XDG_STATE_HOME/bashhst
# editor stuff
if hash nvim 2> /dev/null; then
export EDITOR="nvim"
export VISUAL="nvim"
else
export EDITOR="vim"
export VISUAL="vim"
fi
# for gpg pass key thing
export GPG_TTY=$(tty)
# aliases
alias nivm="nvim"
alias vnim="nvim"
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
if hash eza 2>/dev/null; then
alias ls="eza -a --color=always --sort=type"
else
alias ls="ls -a --color=always --sort=version"
fi
# zoxide
if hash zoxide 2>/dev/null; then
eval "$(zoxide init bash)"
fi
# prompt
if hash starship 2>/dev/null; then
export STARSHIP_CONFIG=$HOME/.config/starship/config.toml
eval "$(starship init bash)"
else
PS1='\e[0;34m\u\e[m \e[0;36m\W \e[m'
fi