.
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
# Source .bashrc for non-interactive Bash shells
|
||||
export BASH_ENV=~/.bashrc
|
||||
echo "shared "
|
||||
|
||||
if [[ $- != *i* ]] ; then
|
||||
# Shell is non-interactive. Be done now!
|
||||
@ -9,14 +10,53 @@ fi
|
||||
THISOS=$(uname | awk '{print tolower($1)}')
|
||||
THISHOST=$(uname -n)
|
||||
|
||||
_setaliases() {
|
||||
case "$THISOS" in
|
||||
darwin)
|
||||
# Use MacVim's terminal vim for awesomeness support
|
||||
hash rvim 2>/dev/null && alias vim=rvim
|
||||
local FIND_EGREP="-E .";
|
||||
local LS_COLORFLAG='-G'
|
||||
;;
|
||||
linux)
|
||||
alias ls='ls -G'
|
||||
local FIND_EGREP=". -regextype posix-egrep";
|
||||
local LS_COLORFLAG='--color=auto'
|
||||
;;
|
||||
esac
|
||||
|
||||
alias ls="ls $LS_COLORFLAG"
|
||||
alias ll='ls -hl'
|
||||
alias l.='ls -d .* --color=auto'
|
||||
alias tree='tree -C'
|
||||
|
||||
alias cruft="find $FIND_EGREP -regex '.*swo|.*swp|.*pyc|.*pyo|.*~' -exec rm {} \;"
|
||||
|
||||
alias p="ps aux |grep "
|
||||
alias grep="grep --color=auto"
|
||||
|
||||
alias facts="echo -ne '\033[36m'; curl -s randomfunfacts.com | grep '<i>' | sed 's/.*<i>\(.*\)<\/i>.*/\1/'; echo -ne '\033[0m'; tput sgr0"
|
||||
|
||||
# show numeric permissions
|
||||
local FORMATFLAG="-c"
|
||||
if ( uname -a | grep Darwin >/dev/null); then
|
||||
FORMATFLAG="-f"
|
||||
fi
|
||||
alias perms="stat $FORMATFLAG '%A %a %n' *"
|
||||
|
||||
alias .bashrc='source ~/.bashrc'
|
||||
|
||||
alias sha256='shasum -a 256'
|
||||
|
||||
|
||||
alias path='echo -e ${PATH//:/\\n}'
|
||||
alias GitPull='/zz/zShared/sbin/GitPull'
|
||||
ZANSIBLE=registry.nopenso.com/upload/zansible
|
||||
|
||||
alias zansible-playbook='docker run -it --rm -v $(pwd):/ansible ${ZANSIBLE}:latest ansible-playbook'
|
||||
alias zansible-lint='docker run -it --rm -v $(pwd):/ansible ${ZANSIBLE}:latest ansible-lint'
|
||||
}
|
||||
|
||||
# History control
|
||||
# don't use duplicate lines or lines starting with space
|
||||
HISTCONTROL=ignoreboth
|
||||
HISTSIZE=1000
|
||||
HISTFILESIZE=2000
|
||||
# append to the history file instead of overwrite
|
||||
shopt -s histappend
|
||||
|
||||
_setpath() {
|
||||
local paths=(
|
||||
@ -134,9 +174,9 @@ _setprompt() {
|
||||
export PS1="$PS1${NEWLINE}${White}\342\224\224\342\224\200>${Color_Off} "
|
||||
;;
|
||||
esac
|
||||
|
||||
}
|
||||
|
||||
|
||||
_sethistory() {
|
||||
export HISTFILE=~/.bash_history
|
||||
export HISTSIZE=10000
|
||||
@ -163,10 +203,11 @@ _manpagecolor() {
|
||||
export LESS_TERMCAP_us=$'\E[01;32m'
|
||||
}
|
||||
|
||||
|
||||
_setpath
|
||||
_setldpath
|
||||
_setldrunpath
|
||||
_setaliases
|
||||
_setlocalaliases
|
||||
_setprompt 2line
|
||||
_sethistory
|
||||
_manpagecolor
|
||||
@ -185,8 +226,8 @@ export TERM=xterm-256color
|
||||
export GOPATH=${HOME}/dev/go
|
||||
|
||||
export ANSIBLE_STDOUT_CALLBACK=yaml
|
||||
export GPODDER_HOME=~/DocumentsPodcasts/config
|
||||
export GPODDER_DOWNLOAD_DIR=~/DocumentsPodcasts/downloads
|
||||
export GPODDER_HOME=
|
||||
export GPODDER_DOWNLOAD_DIR=
|
||||
|
||||
PATH=${PATH}:.local/bin ; export PATH
|
||||
export SIGNAL_PHONE_NUMBER=
|
||||
|
||||
Reference in New Issue
Block a user