clean up bash options

This commit is contained in:
David Alexander Majnemer 2009-01-13 17:19:13 -05:00
parent 271058a160
commit 2a5cd589ed
2 changed files with 17 additions and 15 deletions

17
bash/options Executable file
View file

@ -0,0 +1,17 @@
# put history in .bash
export HISTFILE="${HOME}/.bash/.history"
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize

15
bashrc
View file

@ -3,21 +3,6 @@
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines in the history. See bash(1) for more options
# don't overwrite GNU Midnight Commander's setting of `ignorespace'.
export HISTCONTROL=$HISTCONTROL${HISTCONTROL+,}ignoredups
# ... or force ignoredups and ignorespace
export HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
shopt -s histappend
# for setting history length see HISTSIZE and HISTFILESIZE in bash(1)
# check the window size after each command and, if necessary,
# update the values of LINES and COLUMNS.
shopt -s checkwinsize
if [[ -d "${HOME}/.commonsh" ]] ; then
for file in "${HOME}"/.commonsh/* ; do
source $file