dotfiles/.void.bashrc

66 lines
1.7 KiB
Plaintext
Raw Normal View History

#!/bin/bash
#
# .void.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
2022-01-13 14:11:59 +01:00
cd
2021-09-13 09:49:55 +02:00
PATH=~/.local/bin:$PATH
#################################
# - bash_aliases
# - bash-completion
2021-09-23 12:46:32 +02:00
# always bash-completion first
[[ -r /usr/share/bash-completion/bash_completion ]] && . /usr/share/bash-completion/bash_completion
2021-09-23 12:46:32 +02:00
# integrate git prompt functions
# will break PS1 if not used
[[ -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
#################################
# 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"
export HOME="/home/hendrik"
export EDITOR="vim"
2022-01-13 14:11:59 +01:00
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