From c0e92f01511e3a8c32eb8afb2a12c60df8cfcce0 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 1 Mar 2023 23:05:44 +0100 Subject: bash: regroup settings a bit --- %HOME%/.bashrc | 64 +++++++++++++++++++++++++++------------------------------- 1 file changed, 30 insertions(+), 34 deletions(-) diff --git a/%HOME%/.bashrc b/%HOME%/.bashrc index 532ee05..561eef9 100644 --- a/%HOME%/.bashrc +++ b/%HOME%/.bashrc @@ -23,6 +23,22 @@ export HISTCONTROL=ignoredups export HISTFILESIZE=20000 export HISTSIZE=20000 +# ----------------------------------------------------------------------------- +# Includes +# ----------------------------------------------------------------------------- + +[ -r "$HOME/.bash_utils/file.sh" ] && source "$HOME/.bash_utils/file.sh" +[ -r "$HOME/.bash_utils/text.sh" ] && source "$HOME/.bash_utils/text.sh" + +[ -r "$HOME/.bash_utils/alternatives.sh" ] && source "$HOME/.bash_utils/alternatives.sh" +[ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh" +[ -r "$HOME/.bash_utils/distr.sh" ] && source "$HOME/.bash_utils/distr.sh" +[ -r "$HOME/.bash_utils/git.sh" ] && source "$HOME/.bash_utils/git.sh" +[ -r "$HOME/.bash_utils/os.sh" ] && source "$HOME/.bash_utils/os.sh" +[ -r "$HOME/.bash_utils/path.sh" ] && source "$HOME/.bash_utils/path.sh" + +[ -r "$HOME/.bashrc_local" ] && source "$HOME/.bashrc_local" + # ----------------------------------------------------------------------------- # Shell options # ----------------------------------------------------------------------------- @@ -38,6 +54,20 @@ shopt -s histappend shopt -s nullglob shopt -s nocaseglob +os_is_cygwin && set -o igncr +os_is_cygwin || complete -r + +# I'm sick and tired of third-party scripts breaking b/c of a random shell +# option I use (configure scripts in particular), so I'm commenting this out. +#export SHELLOPTS +#export BASHOPTS + +# I've bumped into this on Linux Mint: Ctrl+S causes my terminal to freeze +# completely (Ctrl+Q is a temporary escape, stty is the cure). +os_is_cygwin \ + || command -v stty > /dev/null 2>&1 \ + && stty -ixon + # ----------------------------------------------------------------------------- # Aliases # ----------------------------------------------------------------------------- @@ -91,40 +121,6 @@ alias xxd='xxd -groupsize 1' GPG_TTY="$( tty )" export GPG_TTY -# ----------------------------------------------------------------------------- -# Includes -# ----------------------------------------------------------------------------- - -[ -r "$HOME/.bash_utils/file.sh" ] && source "$HOME/.bash_utils/file.sh" -[ -r "$HOME/.bash_utils/text.sh" ] && source "$HOME/.bash_utils/text.sh" - -[ -r "$HOME/.bash_utils/alternatives.sh" ] && source "$HOME/.bash_utils/alternatives.sh" -[ -r "$HOME/.bash_utils/cxx.sh" ] && source "$HOME/.bash_utils/cxx.sh" -[ -r "$HOME/.bash_utils/distr.sh" ] && source "$HOME/.bash_utils/distr.sh" -[ -r "$HOME/.bash_utils/git.sh" ] && source "$HOME/.bash_utils/git.sh" -[ -r "$HOME/.bash_utils/os.sh" ] && source "$HOME/.bash_utils/os.sh" -[ -r "$HOME/.bash_utils/path.sh" ] && source "$HOME/.bash_utils/path.sh" - -[ -r "$HOME/.bashrc_local" ] && source "$HOME/.bashrc_local" - -# ----------------------------------------------------------------------------- -# More shell options -# ----------------------------------------------------------------------------- - -os_is_cygwin && set -o igncr -os_is_cygwin || complete -r - -# I'm sick and tired of third-party scripts breaking b/c of a random shell -# option I use (configure scripts in particular), so I'm commenting this out. -#export SHELLOPTS -#export BASHOPTS - -# I've bumped into this on Linux Mint: Ctrl+S causes my terminal to freeze -# completely (Ctrl+Q is a temporary escape, stty is the cure). -os_is_cygwin \ - || command -v stty > /dev/null 2>&1 \ - && stty -ixon - # ----------------------------------------------------------------------------- # nnn # ----------------------------------------------------------------------------- -- cgit v1.2.3