64 lines
1.7 KiB
Bash
64 lines
1.7 KiB
Bash
#!/bin/bash
|
|
|
|
#
|
|
# .void.bashrc
|
|
#
|
|
|
|
# If not running interactively, don't do anything
|
|
[[ $- != *i* ]] && return
|
|
|
|
PATH=~/.local/bin:$PATH
|
|
|
|
#################################
|
|
# - bash_aliases
|
|
# - bash-completion
|
|
|
|
# always bash-completion first
|
|
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
|
|
|
|
# integrate git prompt functions
|
|
# will break PS1 if not used
|
|
[[ -f /usr/share/git/git-prompt.sh ]] && . /usr/share/git/git-prompt.sh
|
|
|
|
# source distro and general purpose aliases
|
|
[[ -r ~/.bash_aliases ]] && . ~/.bash_aliases
|
|
|
|
# set PS1 from file
|
|
# USE ONLY AFTER GIT PROMPT
|
|
[[ -r ~/.ps1 ]] && . ~/.ps1
|
|
|
|
#################################
|
|
# 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)"
|
|
|
|
#################################
|
|
# - 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"
|
|
export HOME="/home/hendrik"
|
|
export EDITOR="vim"
|
|
|
|
|
|
# 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
|