2021-05-19 10:25:20 +02:00
#!/bin/bash
#
# .void.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
#################################
# - bash_aliases
# - bash-completion
2021-09-23 12:46:32 +02:00
# always bash-completion first
2021-05-19 10:25:20 +02:00
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
2022-07-12 17:01:56 +02:00
# custom bash-completions
2022-06-09 13:53:09 +02:00
if [[ -d ~/.config/completions ]]; then
for i in ~/.config/completions/*; do
. $i
done
fi
2021-09-23 12:46:32 +02:00
# integrate git prompt functions
# will break PS1 if not used
2021-05-19 10:25:20 +02:00
[[ -f /usr/share/git/git-prompt.sh ]] && . /usr/share/git/git-prompt.sh
2021-09-23 12:46:32 +02:00
# source distro and general purpose aliases
2021-05-26 16:13:50 +02:00
[[ -r ~/.bash_aliases ]] && . ~/.bash_aliases
2021-09-23 12:46:32 +02:00
# set PS1 from file
# USE ONLY AFTER GIT PROMPT
2021-05-19 12:55:08 +02:00
[[ -r ~/.ps1 ]] && . ~/.ps1
2021-05-19 10:25:20 +02:00
#################################
# don't put duplicate lines or lines starting with space in the history.
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
HISTSIZE=1000
HISTFILESIZE=2000
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
# make less more friendly for non-text input files, see lesspipe(1)
[ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)"
2021-09-23 12:46:32 +02:00
#################################
# - hooks
command -v direnv &>/dev/null && eval "$(direnv hook bash)"
# - env vars
export XBPS_DISTDIR="/home/hendrik/git/void-packages"
export SVDIR="/home/hendrik/sv"
2022-01-28 14:08:27 +01:00
# BEGIN_KITTY_SHELL_INTEGRATION
if test -n "$KITTY_INSTALLATION_DIR" -a -e "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; then source "$KITTY_INSTALLATION_DIR/shell-integration/bash/kitty.bash"; fi
# END_KITTY_SHELL_INTEGRATION