Skip to content

Commit

Permalink
Updating bash stuffz
Browse files Browse the repository at this point in the history
  • Loading branch information
Popsiclestick committed Mar 12, 2020
1 parent 46095e3 commit 3a7b038
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 6 deletions.
3 changes: 3 additions & 0 deletions .gitconfig-personal
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[user]
name = Michael Salsone
email = [email protected]
9 changes: 5 additions & 4 deletions bash_profile
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@ if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# Golang
export GOPATH="$HOME/go"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:/usr/lib/go-1.10/bin"
# Go
GOPATH="/Users/msalsone/go"
export GOPATH

# History
shopt -s histappend
PROMPT_COMMAND='history -a;history -n'
HISTFILESIZE=10000000

# LS Colors
LS_COLORS='no=00:fi=00:di=34:ln=00;35:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;36;40:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:'
Expand Down
16 changes: 14 additions & 2 deletions bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@ alias st="tmux source-file ~/.tmux.conf"
alias nett='lsof -n -i4TCP | grep LISTEN'
alias cdgo='cd ~/go/src/'

# Server Aliases

#ls & tail aliases
alias ls='ls -CFG'
alias ll='ls -la'
Expand Down Expand Up @@ -49,6 +47,11 @@ parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}

# Shorten git commit
gm () {
git commit -m "$1";
}

# Prompt
if [[ $- == *i* ]]; then
export PS1="\[$(tput setaf 2)\][\u\[$(tput setaf 5)\]@\[$(tput setaf 2)\]\h]\[$(tput setaf 5)\] in \[$(tput setaf 2)\]\w\[$(tput setaf 7)\]\$(parse_git_branch)\[$(tput setaf 5)\] at\[$(tput setaf 2)\] \D{%Y-%m-%d} \[$(tput setaf 5)\]\t\n:; \[$(tput sgr0)\]"
Expand Down Expand Up @@ -76,5 +79,14 @@ extract () {
fi
}

# Docker functions
netshoot () {
if [ $# -eq 1 ] ; then
docker run -it --net container:$1 nicolaka/netshoot
fi
}



# Git Completion
test -f ~/.git-completion.bash && . $_
3 changes: 3 additions & 0 deletions gitconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,6 @@
ls = log --pretty=format:'%C(yellow)%h %C(blue bold)%ad %C(reset)%C(white)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short
# more verbose log that shows changed files
ll = log --pretty=format:'%C(yellow)%h %C(blue bold)%ad %C(reset)%C(white)%d %C(reset)%s%C(green) [%cn]' --decorate --date=short --stat

[includeIf "gitdir:~/personal-git/"]
path = .gitconfig-personal

0 comments on commit 3a7b038

Please sign in to comment.