From 119f79b0837d867b5d0f417ec323682c6482eb9e Mon Sep 17 00:00:00 2001 From: x3ku Date: Wed, 30 Sep 2015 14:06:40 -0700 Subject: [PATCH 1/3] Minor tweaks to directory aliases and agnoster.zsh --- lib/directories.zsh | 3 --- themes/agnoster.zsh-theme | 36 +++++++++--------------------------- 2 files changed, 9 insertions(+), 30 deletions(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index 3bffa9fd9..24893766e 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -28,6 +28,3 @@ alias l='ls -lah' alias ll='ls -lh' alias la='ls -lAh' -# Push and pop directories on directory stack -alias pu='pushd' -alias po='popd' diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index e54346acf..3e68d8f07 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -7,9 +7,6 @@ # # In order for this theme to render correctly, you will need a # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). -# Make sure you have a recent version: the code points that Powerline -# uses changed in 2012, and older versions will display incorrectly, -# in confusing ways. # # In addition, I recommend the # [Solarized theme](https://github.com/altercation/solarized/) and, if you're @@ -30,21 +27,12 @@ CURRENT_BG='NONE' -# Special Powerline characters - -() { - local LC_ALL="" LC_CTYPE="en_US.UTF-8" - # NOTE: This segment separator character is correct. In 2012, Powerline changed - # the code points they use for their special characters. This is the new code point. - # If this is not working for you, you probably have an old version of the - # Powerline-patched fonts installed. Download and install the new version. - # Do not submit PRs to change this unless you have reviewed the Powerline code point - # history and have new information. - # This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of - # what font the user is viewing this source code in. Do not replace the - # escape sequence with a single literal character. - SEGMENT_SEPARATOR=$'\ue0b0' #  -} +# Fix odd char on mac +if [[ `uname` == 'Darwin' ]]; then + SEGMENT_SEPARATOR='\ue0b0' +else + SEGMENT_SEPARATOR='' +fi # Begin a segment # Takes two arguments, background and foreground. Both can be omitted, @@ -79,24 +67,18 @@ prompt_end() { # Context: user@hostname (who am I and where am I) prompt_context() { if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then - prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" + prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@MAAZBOOKPRO" fi } # Git: branch/detached head, dirty status prompt_git() { - - local PL_BRANCH_CHAR - () { - local LC_ALL="" LC_CTYPE="en_US.UTF-8" - PL_BRANCH_CHAR=$'\ue0a0' #  - } local ref dirty mode repo_path repo_path=$(git rev-parse --git-dir 2>/dev/null) if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then dirty=$(parse_git_dirty) - ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)" + ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" if [[ -n $dirty ]]; then prompt_segment yellow black else @@ -122,7 +104,7 @@ prompt_git() { zstyle ':vcs_info:*' formats ' %u%c' zstyle ':vcs_info:*' actionformats ' %u%c' vcs_info - echo -n "${ref/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}" + echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }${mode}" fi } From 66a06fcdc55dfbe2f26e46753e7ff060a938819b Mon Sep 17 00:00:00 2001 From: x3ku Date: Mon, 5 Oct 2015 10:50:28 -0700 Subject: [PATCH 2/3] Changing back to machine-id --- themes/agnoster.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 3e68d8f07..3a0c58b89 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -67,7 +67,7 @@ prompt_end() { # Context: user@hostname (who am I and where am I) prompt_context() { if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then - prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@MAAZBOOKPRO" + prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" fi } From 91c4aabca01dc85f63e908c05c1b6967e201f164 Mon Sep 17 00:00:00 2001 From: x3ku Date: Fri, 9 Oct 2015 13:58:01 -0700 Subject: [PATCH 3/3] Adding git aliases --- lib/git.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/git.zsh b/lib/git.zsh index 1e203c7c6..8043e7ed6 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -177,3 +177,6 @@ function git_compare_version() { POST_1_7_2_GIT=$(git_compare_version "1.7.2") #clean up the namespace slightly by removing the checker function unset -f git_compare_version +alias mrupdate='mr update' +alias mr-run='mr run command' +alias mrmaster='mr-run git checkout master'