diff --git a/bash/environment b/bash/environment index 468c8fb..63d2473 100644 --- a/bash/environment +++ b/bash/environment @@ -26,6 +26,8 @@ export HISTSIZE= export HISTFILESIZE= export HISTTIMEFORMAT='%y-%m-%d %T λ ' + +export RIPGREP_CONFIG_PATH="${XDG_CONFIG_HOME}/ripgrep/config" # make less more friendly for non-text input files, see lesspipe(1) [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" diff --git a/bashrc b/bashrc index 3a5d451..d440dde 100644 --- a/bashrc +++ b/bashrc @@ -2,12 +2,18 @@ [ -z "$PS1" ] && return function source-file { + local file file="$1" if [[ -f "$file" ]]; then + # shellcheck disable=SC1090 source "$file" fi } +if [[ ! "${BASH_VERSION}" = "3.2*" ]]; then + shopt -s autocd +fi + source-file /etc/bash_completion source-file ~/.bash/environment source-file ~/.bash/colors @@ -15,7 +21,7 @@ source-file ~/.bash/aliases source-file ~/.bash/functions source-file ~/.bash/path source-file ~/.bash/prompt -source-file ~/.bash/ensure-ssh-agent +#source-file ~/.bash/ensure-ssh-agent source-file ~/.bash/completion source-file ~/opt/bash/env source-file ~/go/bin diff --git a/config/ripgrep/config b/config/ripgrep/config new file mode 100644 index 0000000..dd0c3b0 --- /dev/null +++ b/config/ripgrep/config @@ -0,0 +1 @@ +--colors=line:fg:black diff --git a/profile b/profile index 480daec..3f4b792 100644 --- a/profile +++ b/profile @@ -10,6 +10,13 @@ export XDG_CACHE_HOME=${XDG_CACHE_HOME:="$HOME/.cache"} export XDG_CONFIG_HOME=${XDG_CONFIG_HOME:="$HOME/.config"} export XDG_DATA_HOME=${XDG_DATA_HOME:="$HOME/.local/share"} -[[ -f $XDG_CONFIG_HOME/user-dirs.dirs ]] && eval $( - cat $XDG_CONFIG_HOME/user-dirs.dirs | awk '/^XDG_/ {print "export " $1}') -[[ -f $HOME/.bashrc ]] && source $HOME/.bashrc +[[ -f "${XDG_CONFIG_HOME}/user-dirs.dirs" ]] && eval "$( + awk '/^XDG_/ {print "export " $1}' "${XDG_CONFIG_HOME}/user-dirs.dirs" +)" + +if [[ ${SHELL} = /bin/bash ]] || [[ ${SHELL} = /usr/local/bin/bash ]]; then + # shellcheck disable=SC1090 + if [[ -f "${HOME}/.bashrc" ]]; then + source "${HOME}/.bashrc" + fi +fi