bash tweaks
This commit is contained in:
parent
d0bd25c235
commit
e5b61becc6
@ -76,7 +76,7 @@ if tput setaf 1 &> /dev/null; then
|
||||
gray=$(tput setaf 242);
|
||||
blue=$(tput setaf 109);
|
||||
green=$(tput setaf 143);
|
||||
cyan=$(tput setaf 110);
|
||||
cyan=$(tput setaf 43);
|
||||
orange=$(tput setaf 173);
|
||||
purple=$(tput setaf 125);
|
||||
red=$(tput setaf 167);
|
||||
|
71
.bashrc
71
.bashrc
@ -10,33 +10,64 @@ esac
|
||||
# SHELL OPTIONS
|
||||
# ----------------------------------------------------------------------
|
||||
|
||||
# don't put duplicate lines or lines starting with space in the history.
|
||||
# See bash(1) for more options
|
||||
HISTCONTROL=ignoreboth
|
||||
|
||||
# Append to the Bash history file, rather than overwriting it
|
||||
shopt -s histappend
|
||||
|
||||
# Save multi-line commands as one command
|
||||
shopt -s cmdhist
|
||||
|
||||
# Avoid duplicate entries
|
||||
HISTCONTROL="erasedups:ignoreboth"
|
||||
|
||||
# Don't record some commands
|
||||
export HISTIGNORE="&:[ ]*:exit:ls:bg:fg:history:clear"
|
||||
|
||||
# fuck that you have new mail shit
|
||||
unset MAILCHECK
|
||||
|
||||
# Case-insensitive globbing (used in pathname expansion)
|
||||
shopt -s nocaseglob
|
||||
|
||||
# Autocorrect typos in path names when using `cd`
|
||||
shopt -s cdspell
|
||||
# Turn on recursive globbing (enables ** to recurse all directories)
|
||||
shopt -s globstar 2> /dev/null
|
||||
|
||||
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
# Prepend cd to directory names automatically
|
||||
shopt -s autocd 2> /dev/null
|
||||
|
||||
# check the window size after each command and, if necessary,
|
||||
# update the values of LINES and COLUMNS.
|
||||
# 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
|
||||
|
||||
# Update window size after every command
|
||||
shopt -s checkwinsize
|
||||
|
||||
# If set, the pattern "**" used in a pathname expansion context will
|
||||
# match all files and zero or more directories and subdirectories.
|
||||
#shopt -s globstar
|
||||
# Automatically trim long paths in the prompt (requires Bash 4.x)
|
||||
PROMPT_DIRTRIM=4
|
||||
|
||||
# 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"
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
||||
# LSCOLORS
|
||||
export CLICOLOR=1
|
||||
@ -53,15 +84,3 @@ if [ -x /usr/bin/dircolors ]; then
|
||||
alias fgrep='fgrep --color=auto'
|
||||
alias egrep='egrep --color=auto'
|
||||
fi
|
||||
|
||||
|
||||
# enable programmable completion features (you don't need to enable
|
||||
# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
|
||||
# sources /etc/bash.bashrc).
|
||||
if ! shopt -oq posix; then
|
||||
if [ -f /usr/share/bash-completion/bash_completion ]; then
|
||||
. /usr/share/bash-completion/bash_completion
|
||||
elif [ -f /etc/bash_completion ]; then
|
||||
. /etc/bash_completion
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user