Skip to content
This repository has been archived by the owner on Oct 5, 2019. It is now read-only.

Commit

Permalink
Changes required for me now using MacOS bash and iTerm2
Browse files Browse the repository at this point in the history
  • Loading branch information
Lucas Costi authored and lucascosti committed Jan 14, 2019
1 parent fb3ce2b commit 34f13a0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 29 deletions.
30 changes: 9 additions & 21 deletions .bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -20,36 +20,19 @@ PS1="${green}[\u@\h \W] \$${normal} "

# Regular aliases
alias ffs='sudo "$BASH" -c "$(history -p !!)"'
alias sdnfu='sudo dnf update'
alias sdnfur='sudo dnf update --refresh'
alias sdnfi='sudo dnf install'
alias sdnfr='sudo dnf remove'
alias bi='brew install'
alias br='brew uninstall'
alias bu='brew update'
# Color fix for home monitor: see: https://lucascosti.com/blog/2016/08/monitor-colour-problems-over-hdmi/
alias hdmi-color-fix='sh ~/bashscripts/hdmi-colour-fix.sh'

# Build aliases
alias brewstart="rhpkg publican-build --lang en-US"
alias cspbuild="csprocessor build"
alias pubbuild="publican build --langs en-US --formats html-single"
alias mvnbuildeap='mvn clean install -DskipTests -Denforcer.skip=true -Dcheckstyle.skip=true -T2 -Dwildfly.skip=true'
alias mvnbuildwildfly='mvn clean install -DskipTests'

# CCS repo aliases
## Easy grep to exclude build folders. e.g.: ggrep infinispan
ggrep () { grep "$@" -iR --exclude-dir={build,html}; }
## Build a guide when in a guide folder
alias bg='./buildGuide.sh'
## Opens a locally-built doc
alias previewdoc="firefox build/tmp/en-US/html-single/index.html"
## Do both of the above in one command
alias bgp="bg && previewdoc"

# Git
## Git aliases
alias g='git'
alias gfu='git fetch upstream'
alias gfo='git fetch origin'
alias gr='git rebase'
alias gpull='git pull'
alias gs='git status'
alias gc='git checkout'
alias gl="git log --pretty=format:'%Cblue%h%Creset%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)%an%Creset' --abbrev-commit --date=relative"
Expand Down Expand Up @@ -182,3 +165,8 @@ fi
# as last entry source the gitprompt script
GIT_PROMPT_THEME=Lucas_bullettrain_tags # use custom .git-prompt-colors.sh
source ~/bashscripts/bash-git-prompt/gitprompt.sh

#########
# Required for GitHub docs builds bootstrap
eval "$(rbenv init -)"
eval "$(nodenv init -)"
21 changes: 13 additions & 8 deletions bashscripts/bash-git-prompt/themes/Lucas_bullettrain_tags.bgptheme
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ override_git_prompt_colors() {
# GIT_PROMPT_STASHED="${BoldBlue}⚑ " # the number of stashed files/dir
# GIT_PROMPT_CLEAN="${BoldGreen}✔" # a colored flag indicating a "clean" repo

## For the command indicator, the placeholder _LAST_COMMAND_STATE_
## For the command indicator, the placeholder _LAST_COMMAND_STATE_
## will be replaced with the exit code of the last command
## e.g.
## GIT_PROMPT_COMMAND_OK="${Green}✔-_LAST_COMMAND_STATE_ " # indicator if the last command returned with an exit code of 0
Expand All @@ -36,18 +36,18 @@ override_git_prompt_colors() {
# GIT_PROMPT_COMMAND_FAIL="${Red}✘-_LAST_COMMAND_STATE_" # indicator if the last command returned with an exit code of other than 0

## template for displaying the current virtual environment
## use the placeholder _VIRTUALENV_ will be replaced with
## use the placeholder _VIRTUALENV_ will be replaced with
## the name of the current virtual environment (currently CONDA and VIRTUAL_ENV)
# GIT_PROMPT_VIRTUALENV="(${Blue}_VIRTUALENV_${ResetColor}) "

## _LAST_COMMAND_INDICATOR_ will be replaced by the appropriate GIT_PROMPT_COMMAND_OK OR GIT_PROMPT_COMMAND_FAIL
# GIT_PROMPT_START_USER="_LAST_COMMAND_INDICATOR_ ${Yellow}${PathShort}${ResetColor}"
# GIT_PROMPT_START_ROOT="_LAST_COMMAND_INDICATOR_ ${GIT_PROMPT_START_USER}"
# GIT_PROMPT_END_USER=" \n${White}${Time12a}${ResetColor} $ "
# GIT_PROMPT_END_ROOT=" \n${White}${Time12a}${ResetColor} # "

# LUCAS' CONTENT BELOW HERE

# Lucas' colors
# See http://askubuntu.com/a/558422, http://misc.flogisoft.com/bash/tip_colors_and_formatting for a good list
## Foreground colours
Expand Down Expand Up @@ -99,8 +99,13 @@ override_git_prompt_colors() {
# Powerline characters
## For Powerline characters see: echo -e "\ue0a0\ue0a1\ue0a2\ue0b0\ue0b1\ue0b2\ue0b3"
## Powerline font downloads: https://github.com/powerline/fonts
PWRLN_SEP=$'\ue0b0'
PWRLN_BRA=$'\ue0a0'
## Modern unicode patterns for Linux:
### PWRLN_SEP=$'\ue0b0'
### PWRLN_BRA=$'\ue0a0'
## The following works for MacOS bash: (see for working out the code: https://unix.stackexchange.com/questions/59054/bash-prompt-not-recognizing-unicode-escapes) $'\xee\x82\xb0 '
## I have replaced the unicode delarations with a simple copy+paste of the symbol, which seems to work in iTerm2 on MacOS.
PWRLN_SEP=$''
PWRLN_BRA=$''


# Time part
Expand Down Expand Up @@ -143,7 +148,7 @@ override_git_prompt_colors() {
# GIT_PROMPT_SYMBOLS_AHEAD="↑·" # The symbol for "n versions ahead of origin"
# GIT_PROMPT_SYMBOLS_BEHIND="↓·" # The symbol for "n versions behind of origin"
# GIT_PROMPT_SYMBOLS_PREHASH=":" # Written before hash of commit, if no name could be found
# GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="L" # This symbol is written after the branch, if the branch is not tracked
# GIT_PROMPT_SYMBOLS_NO_REMOTE_TRACKING="L" # This symbol is written after the branch, if the branch is not tracked
}

reload_git_prompt_colors "Custom"
reload_git_prompt_colors "Custom"

0 comments on commit 34f13a0

Please sign in to comment.