Skip to content

Instantly share code, notes, and snippets.

@tobek

tobek/.bashrc Secret

Created January 8, 2017 01:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tobek/c8038c207f318528c3157b4a402aa2d9 to your computer and use it in GitHub Desktop.
Save tobek/c8038c207f318528c3157b4a402aa2d9 to your computer and use it in GitHub Desktop.
Bash configs
#
# ~/.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=50000 # custom history length
export HISTFILESIZE=10000000 # custom history file size
shopt -s histappend # append to history, don't overwrite
if [ -f "${HOME}/.bash_aliases" ]; then
source "${HOME}/.bash_aliases"
fi
if [ -f "${HOME}/.bash_functions" ]; then
source "${HOME}/.bash_functions"
fi
BASHISHDIR="/usr/share/bashish" ## line added by bashish
TTY=`tty 2>/dev/null` && if test "x$BASHISHDIR" != x;then ## line added by bashish
test "$BASHISH_OLDPATH"||BASHISH_OLDPATH="$PATH" ## line added by bashish
PATH="$HOME/.bashish/launcher:$BASHISHDIR/lib:$BASHISH_OLDPATH" ## line added by bashish
BASHSISH_CP=437 ## line added by bashish
TEST_TERM="$TERM" _bashish_utfcheck && BASHISH_CP=utf8 ## line added by bashish
ENV="$HOME/.profile" ## line added by bashish
export BASHISH_CP BASHISH_OLDPATH TTY ENV ## line added by bashish
. "$BASHISHDIR/main/prompt/sh/init" ## line added by bashish
fi ## line added by bashish
if [[ $(tty) == /dev/tty* ]]; then
tmux -u
fi
# /etc/profile
#Set our umask
umask 022
# Set our default path
PATH="/usr/local/sbin:/usr/local/bin:/usr/bin"
export PATH
# Load profiles from /etc/profile.d
if test -d /etc/profile.d/; then
for profile in /etc/profile.d/*.sh; do
test -r "$profile" && . "$profile"
done
unset profile
fi
# Source global bash config
if test "$PS1" && test "$BASH" && test -z ${POSIXLY_CORRECT+x} && test -r /etc/bash.bashrc; then
. /etc/bash.bashrc
fi
# Termcap is outdated, old, and crusty, kill it.
unset TERMCAP
# Man is much better than us at figuring this out
unset MANPATH
BASHISHDIR="/usr/share/bashish" ## line added by bashish
TTY=`tty 2>/dev/null` && if test "x$BASHISHDIR" != x;then ## line added by bashish
test "$BASHISH_OLDPATH"||BASHISH_OLDPATH="$PATH" ## line added by bashish
PATH="$HOME/.bashish/launcher:$BASHISHDIR/lib:$BASHISH_OLDPATH" ## line added by bashish
BASHSISH_CP=437 ## line added by bashish
TEST_TERM="$TERM" _bashish_utfcheck && BASHISH_CP=utf8 ## line added by bashish
ENV="$HOME/.profile" ## line added by bashish
export BASHISH_CP BASHISH_OLDPATH TTY ENV ## line added by bashish
. "$BASHISHDIR/main/prompt/sh/init" ## line added by bashish
fi ## line added by bashish
#
# /etc/bash.bashrc
#
# If not running interactively, don't do anything
[[ $- != *i* ]] && return
[[ $DISPLAY ]] && shopt -s checkwinsize
PS1='[\u@\h \W]\$ '
case ${TERM} in
xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
screen)
PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/\~}"'
;;
esac
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment