54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
# Could use `environments` but it's less performant
|
|
export ENV="$HOME/.bashrc" \
|
|
FUNCNEST=100 \
|
|
FZF_DEFAULT_COMMAND='find .' \
|
|
FZF_DEFAULT_OPTS='--layout=reverse --height=20 --no-mouse -i' \
|
|
FZF_TMUX_HEIGHT='20' \
|
|
GPG_TTY="$(tty)" \
|
|
GTK2_RC_FILES="$HOME/.config/gtk-2.0/gtkrc-2.0" \
|
|
HISTCONTROL='ignoredups' \
|
|
HISTFILE="$HOME/.cache/.bash_history" \
|
|
JOBS="$(nproc --all)" \
|
|
LESS='-rIM --use-color --incsearch' \
|
|
LESSHISTFILE="$HOME/.cache/.lesshst" \
|
|
MANPATH="$MANPATH:$HOME/.local/share/man" \
|
|
NODE_REPL_HISTORY="$HOME/.cache/.node_repl_history" \
|
|
RLWRAP_HOME="$HOME/.cache" \
|
|
SQLITE_HISTORY="$HOME/.cache/.sqlite_history" \
|
|
VISUAL="$EDITOR" \
|
|
XAUTHORITY="$HOME/.local/share/xorg/Xauthorty" \
|
|
XZ_OPT='-e9T0'
|
|
|
|
# Enable FZF support
|
|
_fzf_comp='/usr/share/bash-completion/completions/fzf'
|
|
_fzf_binds='/usr/share/fzf/key-bindings.bash'
|
|
|
|
[ -f "$_fzf_comp" ] && source "$_fzf_comp"
|
|
[ -f "$_fzf_binds" ] && source "$_fzf_binds"
|
|
|
|
# Programmable completion
|
|
if ! shopt -oq posix; then
|
|
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
|
. /usr/share/bash-completion/bash_completion
|
|
elif [ -f /etc/bash_completion ]; then
|
|
. /etc/bash_completion
|
|
fi
|
|
fi
|
|
|
|
# Enable tabtab
|
|
[ -f "$HOME/.config/tabtab/__tabtab.bash" ] && . "$HOME/.config/tabtab/__tabtab.bash"
|
|
|
|
# Disable stuff like ^S and ^Q
|
|
stty -ixon
|
|
|
|
# Enable Vi(M) mode
|
|
set -o vi
|
|
|
|
# cd into a directory with only the name supplied
|
|
shopt -s autocd
|
|
|
|
# Enable extended globbing
|
|
shopt -s globstar
|
|
shopt -s extglob
|