Last active
June 6, 2020 11:28
-
-
Save yuraloginoff/f589aaeb14b5c70363aed4a0ed00e41c to your computer and use it in GitHub Desktop.
#bash: Customizing Bash environment and setup environment variables
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# Customizing Bash environment | |
# | |
# Correct dir spellings | |
shopt -q -s cdspell | |
# Make sure display get updated when terminal window get resized | |
shopt -q -s checkwinsize | |
# Turn on the extended pattern matching features | |
shopt -q -s extglob | |
# Append rather than overwrite history on exit | |
shopt -s histappend | |
# Make multi-line commandsline in history | |
shopt -q -s cmdhist | |
# Get immediate notification of background job termination | |
set -o notify | |
# Disable [CTRL-D] which is used to exit the shell | |
set -o ignoreeof | |
# Disable core files | |
ulimit -S -c 0 > /dev/null 2>&1 | |
# | |
# Setup environment variables | |
# | |
# Store 5000 commands in history buffer | |
export HISTSIZE=5000 | |
# Store 5000 commands in history FILE | |
export HISTFILESIZE=5000 | |
# Avoid duplicates in hisotry | |
export HISTIGNORE='&:[ ]*' | |
# Use less command as a pager | |
export PAGER=less | |
# Set vim as default text editor | |
export EDITOR=vim | |
export VISUAL=vim | |
export SVN_EDITOR="$VISUAL" | |
# Oracle database specific | |
export ORACLE_HOME=/usr/lib/oracle/xe/app/oracle/product/10.2.0/server | |
export ORACLE_SID=XE | |
export NLS_LANG=$($ORACLE_HOME/bin/nls_lang.sh) | |
# Set JAVA_HOME | |
export JAVA_HOME=/usr/lib/jvm/java-6-sun/jre | |
# Add ORACLE, JAVA and ~/bin bin to PATH | |
export PATH=$PATH:$ORACLE_HOME/bin:$HOME/bin:$JAVA_HOME/bin | |
# Secure SSH login stuff using keychain | |
# No need to input password again ever | |
/usr/bin/keychain $HOME/.ssh/id_dsa | |
source $HOME/.keychain/$HOSTNAME-sh | |
# Turn on Bash command completion | |
source /etc/bash_completion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment