From 9bc3be516e1002e94cdf6d15f23d536b11f77420 Mon Sep 17 00:00:00 2001 From: MustyMouse Date: Wed, 22 May 2019 16:36:51 -0500 Subject: [PATCH 1/3] Update .bash_profile --- .bash_profile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.bash_profile b/.bash_profile index 22d0ef9..5682429 100644 --- a/.bash_profile +++ b/.bash_profile @@ -8,6 +8,7 @@ alias s='open -a "Sublime Text"' colorflag="-G" alias ls="command ls ${colorflag}" alias l="ls -lF ${colorflag}" # all files, in long format +alias ll="ls -lah --color=auto" alias la="ls -laF ${colorflag}" # all files inc dotfiles, in long format alias lsd='ls -lF ${colorflag} | grep "^d"' # only directories @@ -46,11 +47,13 @@ if tput setaf 1 &> /dev/null; then if [[ $(tput colors) -ge 256 ]] 2>/dev/null; then MAGENTA=$(tput setaf 9) ORANGE=$(tput setaf 172) + YELLOW=$(tput setaf 272) GREEN=$(tput setaf 190) PURPLE=$(tput setaf 141) else MAGENTA=$(tput setaf 5) ORANGE=$(tput setaf 4) + YELLOW=$(tput setaf 3) GREEN=$(tput setaf 2) PURPLE=$(tput setaf 1) fi @@ -61,6 +64,7 @@ else ORANGE="\033[1;33m" GREEN="\033[1;32m" PURPLE="\033[1;35m" + YELLOW="\033[38;5;11m" BOLD="" RESET="\033[m" fi @@ -69,6 +73,7 @@ export MAGENTA export ORANGE export GREEN export PURPLE +export YELLOW export BOLD export RESET From c5ae836dee02be013830a8f39fb7ee5075d3c8bd Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 22 May 2019 16:56:00 -0500 Subject: [PATCH 2/3] Resolving issues/PRs from origin barryclark/bashstrap#17, barryclark/bashstrap#18, barryclark/bashstrap#19, barryclark/bashstrap#20 --- .bash_profile | 35 +++++++++++++++++++++++++++++------ 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/.bash_profile b/.bash_profile index 22d0ef9..fcc363e 100644 --- a/.bash_profile +++ b/.bash_profile @@ -26,10 +26,27 @@ alias c='pygmentize -O style=monokai -f console256 -g' # Git # You must install Git first -alias gs='git status' -alias ga='git add .' -alias gc='git commit -m' # requires you to type a commit message -alias gp='git push' +alias g='git status -sb' +alias gh='git hist' +alias gp='git pull' +alias gpr='git pull --rebase' +alias gpp='git pull --rebase && git push' +alias gf='git fetch' +alias gb='git branch' +alias ga='git add' +alias gc='git commit' +alias gca='git commit --amend' +alias gcv='git commit --no-verify' +alias gd='git diff --color-words' +alias gdc='git diff --cached -w' +alias gdw='git diff --no-ext-diff --word-diff' +alias gdv='git diff' +alias gl='git log --oneline --decorate' +alias gt='git tag' +alias grc='git rebase --continue' +alias grs='git rebase --skip' +alias gsl='git stash list' +alias gss='git stash save' alias grm='git rm $(git ls-files --deleted)' ### Prompt Colors @@ -74,17 +91,23 @@ export RESET # Git branch details function parse_git_dirty() { - [[ $(git status 2> /dev/null | tail -n1) != *"working directory clean"* ]] && echo "*" + [[ $(git status 2> /dev/null | tail -n1) != *"working tree clean"* ]] && echo "*" } function parse_git_branch() { git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e "s/* \(.*\)/\1$(parse_git_dirty)/" } +function parse_hg_dirty() { + [[ $(hg status 2> /dev/null | tail -n1) ]] && echo "*" +} +function parse_hg_branch() { + hg branch 2> /dev/null | sed -e "s/\(.*\)/\1$(parse_hg_dirty)/" +} # Change this symbol to something sweet. # (http://en.wikipedia.org/wiki/Unicode_symbols) symbol="⚡ " -export PS1="\[${MAGENTA}\]\u \[$RESET\]in \[$GREEN\]\w\[$RESET\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$RESET\]\n$symbol\[$RESET\]" +export PS1="\[${MAGENTA}\]\u \[$RESET\]in \[$GREEN\]\w\[$RESET\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$RESET\]\$([[ -n \$(hg branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_hg_branch)\[$RESET\]\n$symbol\[$RESET\]" export PS2="\[$ORANGE\]→ \[$RESET\]" From 41cf63b0e1b60fa30ed1242948c67838f115c324 Mon Sep 17 00:00:00 2001 From: Brett Date: Wed, 22 May 2019 17:00:24 -0500 Subject: [PATCH 3/3] Resolving issues/PRs from origin barryclark/bashstrap#17, barryclark/bashstrap#18, barryclark/bashstrap#19, barryclark/bashstrap#20 --- .bash_profile | 1 - 1 file changed, 1 deletion(-) diff --git a/.bash_profile b/.bash_profile index 54f8915..5d8f7b0 100644 --- a/.bash_profile +++ b/.bash_profile @@ -115,7 +115,6 @@ symbol="⚡ " export PS1="\[${MAGENTA}\]\u \[$RESET\]in \[$GREEN\]\w\[$RESET\]\$([[ -n \$(git branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_git_branch)\[$RESET\]\$([[ -n \$(hg branch 2> /dev/null) ]] && echo \" on \")\[$PURPLE\]\$(parse_hg_branch)\[$RESET\]\n$symbol\[$RESET\]" export PS2="\[$ORANGE\]→ \[$RESET\]" - ### Misc # Only show the current directory's name in the tab