dotfiles/system/.bashrc
Severin Kaderli 8d3f9c8a1d
More config cleanup
Signed-off-by: Severin Kaderli <severin.kaderli@gmail.com>
2019-02-13 00:47:10 +01:00

50 lines
No EOL
1.1 KiB
Bash

#!/bin/bash
#
# SCRIPT NAME:
# .bashrc
#
# AUTHOR:
# Severin Kaderli <severin.kaderli@gmail.com>
#
# DESCRIPTION:
# This script is called when you start a new shell.
#
# USAGE:
# This script is automatically executed when you start a new shell.
# Bash configuration
shopt -s histappend
shopt -s checkwinsize
shopt -s globstar
# XDG_Base_Directories
export XDG_CONFIG_HOME="${HOME}/.config"
export XDG_CACHE_HOME="${HOME}/.cache"
export XDG_DATA_HOME="${HOME}/.local/share"
export XDG_BIN_HOME="${HOME}/.local/bin"
# Sourcing environment variables
if [ -f "${HOME}/.env" ]; then
. "${HOME}/.env"
fi
# Enable color support of ls
if [ -f "${XDG_CONFIG_HOME}/custom/dircolors" ]; then
dircolors -b "${XDG_CONFIG_HOME}/custom/dircolors" > /dev/null 2>&1
fi
# Sourcing alias definitions
if [ -f "${HOME}/.aliases" ]; then
. "${HOME}/.aliases"
fi
# Source git-prompt script
if [ -f "/usr/share/git/completion/git-prompt.sh" ]; then
. "/usr/share/git/completion/git-prompt.sh"
fi
# Enable autocompletion features
if [ -f "/usr/share/bash-completion/bash_completion" ]; then
. /usr/share/bash-completion/bash_completion
fi
complete -cf sudo