aboutsummaryrefslogtreecommitdiff
path: root/dot_bashrc
blob: 938817ea6d2753d8cdf3944183e25d8a81d847f4 (plain)
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
stty -ixon # Disable ctrl-s and ctrl-q.
stty erase ^H # Can happen by pressing Return key
shopt -s autocd cdspell checkjobs extglob histappend

# autocd : Allows you to cd into directory merely by typing the directory name.
# cdspell : minor errors in the spelling of a directory component in a cd command are corrected
# checkjobs : bash lists the status of any stopped and running jobs before exiting an interactive shell
# extglob : extended globing, advanced pattern matching
# histappend:  append to the history instead of overwriting (good for multiple connections)

HISTSIZE= HISTFILESIZE= # Infinite history.
export HISTCONTROL='ignorespace:erasedups'

export XDG_DATA_HOME="$HOME"/.local/share
export XDG_CONFIG_HOME="$HOME"/.config
export XDG_STATE_HOME="$HOME"/.local/state
export XDG_CACHE_HOME="$HOME"/.cache
export ANSIBLE_HOME="$XDG_DATA_HOME"/ansible
export GNUPGHOME="$XDG_DATA_HOME"/gnupg
export ANDROID_HOME="$XDG_DATA_HOME"/android
export HISTFILE="$XDG_STATE_HOME"/bash/history
export LESSHISTFILE="$XDG_CACHE_HOME"/less/history
export PYTHONSTARTUP="$XDG_CONFIG_HOME"/python/pythonrc
export W3M_DIR="$XDG_DATA_HOME"/w3m
export _JAVA_OPTIONS=-Djava.util.prefs.userRoot="$XDG_CONFIG_HOME"/java
export NODE_REPL_HISTORY="$XDG_DATA_HOME"/node_repl_history
export MYPY_CACHE_DIR="$XDG_CACHE_HOME"/mypy

PS1="\[$(tput bold)\]\[$(tput setaf 1)\][\[$(tput setaf 3)\]\u\[$(tput setaf 2)\]@\[$(tput setaf 4)\]\h \[$(tput setaf 5)\]\w\[$(tput setaf 1)\]]\[$(tput setaf 7)\]\\$ \[$(tput sgr0)\]" ; export PS1

[ -f "$HOME/.config/aliasrc" ] && source "$HOME/.config/aliasrc"

# using echo because -bash, for exemple, would break figlet
echo "$0" | figlet | lolcat -f -r -l -v 1 -h 1

. "$HOME/.cargo/env"