From 0cd388fe6845b191053bb3d58da1a65b4d6acb10 Mon Sep 17 00:00:00 2001 From: Phantop Date: Sun, 7 Apr 2019 22:45:38 -0400 Subject: [PATCH] Clean up ~ --- .bashrc | 97 +++++++++++++++++++++++++++++++++++++++++++++++++++++- .sensibash | 96 ----------------------------------------------------- .xinitrc | 1 - .xprofile | 1 - 4 files changed, 96 insertions(+), 99 deletions(-) delete mode 100644 .sensibash delete mode 100644 .xinitrc delete mode 100644 .xprofile diff --git a/.bashrc b/.bashrc index f296932..e23ab4e 100644 --- a/.bashrc +++ b/.bashrc @@ -88,4 +88,99 @@ command -v git >/dev/null 2>&1 && PROMPT_COMMAND=prompt_command bind 'set show-all-if-ambiguous on' bind 'TAB:menu-complete' -source ~/.sensibash +# Sensible Bash - An attempt at saner Bash defaults +# Maintainer: mrzool +# Repository: https://github.com/mrzool/bash-sensible +# Version: 0.2.2 + +## GENERAL OPTIONS ## + +# Prevent file overwrite on stdout redirection +# Use `>|` to force redirection to an existing file +set -o noclobber + +# Update window size after every command +shopt -s checkwinsize + +# Automatically trim long paths in the prompt (requires Bash 4.x) +PROMPT_DIRTRIM=2 + +# Enable history expansion with space +# E.g. typing !! will replace the !! with your last command +bind Space:magic-space + +# Turn on recursive globbing (enables ** to recurse all directories) +shopt -s globstar 2> /dev/null + +# Case-insensitive globbing (used in pathname expansion) +shopt -s nocaseglob; + +## SMARTER TAB-COMPLETION (Readline bindings) ## + +# Perform file completion in a case insensitive fashion +bind "set completion-ignore-case on" + +# Treat hyphens and underscores as equivalent +bind "set completion-map-case on" + +# Display matches for ambiguous patterns at first tab press +bind "set show-all-if-ambiguous on" + +# Immediately add a trailing slash when autocompleting symlinks to directories +bind "set mark-symlinked-directories on" + +## SANE HISTORY DEFAULTS ## + +# Append to the history file, don't overwrite it +shopt -s histappend + +# Save multi-line commands as one command +shopt -s cmdhist + + +# Huge history. Doesn't appear to slow things down, so why not? +HISTSIZE=500000 +HISTFILESIZE=100000 + +# Avoid duplicate entries +HISTCONTROL="erasedups:ignoreboth" + +# Don't record some commands +export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear" + +# Use standard ISO 8601 timestamp +# %F equivalent to %Y-%m-%d +# %T equivalent to %H:%M:%S (24-hours format) +HISTTIMEFORMAT='%F %T ' + +# Enable incremental history search with up/down arrows (also Readline goodness) +# Learn more about this here: http://codeinthehole.com/writing/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/ +bind '"\e[A": history-search-backward' +bind '"\e[B": history-search-forward' +bind '"\e[C": forward-char' +bind '"\e[D": backward-char' + +## BETTER DIRECTORY NAVIGATION ## + +# Prepend cd to directory names automatically +shopt -s autocd 2> /dev/null +# Correct spelling errors during tab-completion +shopt -s dirspell 2> /dev/null +# Correct spelling errors in arguments supplied to cd +shopt -s cdspell 2> /dev/null + +# This defines where cd looks for targets +# Add the directories you want to have fast access to, separated by colon +# Ex: CDPATH=".:~:~/projects" will look for targets in the current working directory, in home and in the ~/projects folder +CDPATH="." + +# This allows you to bookmark your favorite places across the file system +# Define a variable containing a path and you will be able to cd into it regardless of the directory you're in +shopt -s cdable_vars + +# Examples: +# export dotfiles="$HOME/dotfiles" +# export projects="$HOME/projects" +# export documents="$HOME/Documents" +# export dropbox="$HOME/Dropbox" + diff --git a/.sensibash b/.sensibash deleted file mode 100644 index d954d3c..0000000 --- a/.sensibash +++ /dev/null @@ -1,96 +0,0 @@ -# Sensible Bash - An attempt at saner Bash defaults -# Maintainer: mrzool -# Repository: https://github.com/mrzool/bash-sensible -# Version: 0.2.2 - -## GENERAL OPTIONS ## - -# Prevent file overwrite on stdout redirection -# Use `>|` to force redirection to an existing file -set -o noclobber - -# Update window size after every command -shopt -s checkwinsize - -# Automatically trim long paths in the prompt (requires Bash 4.x) -PROMPT_DIRTRIM=2 - -# Enable history expansion with space -# E.g. typing !! will replace the !! with your last command -bind Space:magic-space - -# Turn on recursive globbing (enables ** to recurse all directories) -shopt -s globstar 2> /dev/null - -# Case-insensitive globbing (used in pathname expansion) -shopt -s nocaseglob; - -## SMARTER TAB-COMPLETION (Readline bindings) ## - -# Perform file completion in a case insensitive fashion -bind "set completion-ignore-case on" - -# Treat hyphens and underscores as equivalent -bind "set completion-map-case on" - -# Display matches for ambiguous patterns at first tab press -bind "set show-all-if-ambiguous on" - -# Immediately add a trailing slash when autocompleting symlinks to directories -bind "set mark-symlinked-directories on" - -## SANE HISTORY DEFAULTS ## - -# Append to the history file, don't overwrite it -shopt -s histappend - -# Save multi-line commands as one command -shopt -s cmdhist - - -# Huge history. Doesn't appear to slow things down, so why not? -HISTSIZE=500000 -HISTFILESIZE=100000 - -# Avoid duplicate entries -HISTCONTROL="erasedups:ignoreboth" - -# Don't record some commands -export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear" - -# Use standard ISO 8601 timestamp -# %F equivalent to %Y-%m-%d -# %T equivalent to %H:%M:%S (24-hours format) -HISTTIMEFORMAT='%F %T ' - -# Enable incremental history search with up/down arrows (also Readline goodness) -# Learn more about this here: http://codeinthehole.com/writing/the-most-important-command-line-tip-incremental-history-searching-with-inputrc/ -bind '"\e[A": history-search-backward' -bind '"\e[B": history-search-forward' -bind '"\e[C": forward-char' -bind '"\e[D": backward-char' - -## BETTER DIRECTORY NAVIGATION ## - -# Prepend cd to directory names automatically -shopt -s autocd 2> /dev/null -# Correct spelling errors during tab-completion -shopt -s dirspell 2> /dev/null -# Correct spelling errors in arguments supplied to cd -shopt -s cdspell 2> /dev/null - -# This defines where cd looks for targets -# Add the directories you want to have fast access to, separated by colon -# Ex: CDPATH=".:~:~/projects" will look for targets in the current working directory, in home and in the ~/projects folder -CDPATH="." - -# This allows you to bookmark your favorite places across the file system -# Define a variable containing a path and you will be able to cd into it regardless of the directory you're in -shopt -s cdable_vars - -# Examples: -# export dotfiles="$HOME/dotfiles" -# export projects="$HOME/projects" -# export documents="$HOME/Documents" -# export dropbox="$HOME/Dropbox" - diff --git a/.xinitrc b/.xinitrc deleted file mode 100644 index 9c1ae1c..0000000 --- a/.xinitrc +++ /dev/null @@ -1 +0,0 @@ -[[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources diff --git a/.xprofile b/.xprofile deleted file mode 100644 index b5f08b0..0000000 --- a/.xprofile +++ /dev/null @@ -1 +0,0 @@ -USRRESOURCES=/home/glados/.Xresources