From 34f13a030692e524dacdad455fe5b282e4ffd872 Mon Sep 17 00:00:00 2001 From: Lucas Costi Date: Tue, 1 Jan 2019 23:43:33 +1000 Subject: [PATCH] Changes required for me now using MacOS bash and iTerm2 --- .bashrc | 30 ++++++------------- .../themes/Lucas_bullettrain_tags.bgptheme | 21 ++++++++----- 2 files changed, 22 insertions(+), 29 deletions(-) diff --git a/.bashrc b/.bashrc index f4a200d..f015a9f 100755 --- a/.bashrc +++ b/.bashrc @@ -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" @@ -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 -)" diff --git a/bashscripts/bash-git-prompt/themes/Lucas_bullettrain_tags.bgptheme b/bashscripts/bash-git-prompt/themes/Lucas_bullettrain_tags.bgptheme index b40a351..709c79d 100644 --- a/bashscripts/bash-git-prompt/themes/Lucas_bullettrain_tags.bgptheme +++ b/bashscripts/bash-git-prompt/themes/Lucas_bullettrain_tags.bgptheme @@ -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 @@ -36,10 +36,10 @@ 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}" @@ -47,7 +47,7 @@ override_git_prompt_colors() { # 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 @@ -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 @@ -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" \ No newline at end of file +reload_git_prompt_colors "Custom"