Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: robbyrussell/oh-my-zsh
base: master
...
head fork: scelis/oh-my-zsh
compare: master
Checking mergeability… Don't worry, you can still create the pull request.
  • 7 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
3  .gitmodules
@@ -0,0 +1,3 @@
+[submodule "plugins/zsh-syntax-highlighting"]
+ path = plugins/zsh-syntax-highlighting
+ url = git://github.com/zsh-users/zsh-syntax-highlighting.git
View
6 lib/functions.zsh
@@ -10,6 +10,12 @@ function upgrade_oh_my_zsh() {
/usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh
}
+function prompt_remote_hostname {
+ if [ -n "$SSH_TTY" ]; then
+ echo "$ZSH_THEME_REMOTE_HOSTNAME_PREFIX%m$ZSH_THEME_REMOTE_HOSTNAME_SUFFIX"
+ fi
+}
+
function take() {
mkdir -p $1
cd $1
View
21 lib/git.zsh
@@ -1,7 +1,7 @@
# get the name of the branch we are on
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
- echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
+ echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(git_prompt_ahead_behind)$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
}
@@ -26,6 +26,25 @@ function git_prompt_ahead() {
fi
}
+# Checks if there are commits behind from remote
+function git_prompt_behind() {
+ if $(echo "$(git log HEAD..origin/$(current_branch) 2> /dev/null)" | grep '^commit' &> /dev/null); then
+ echo "$ZSH_THEME_GIT_PROMPT_BEHIND"
+ fi
+}
+
+function git_prompt_ahead_behind() {
+ if $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
+ if $(echo "$(git log HEAD..origin/$(current_branch) 2> /dev/null)" | grep '^commit' &> /dev/null); then
+ echo "$ZSH_THEME_GIT_PROMPT_DIVERGED"
+ else
+ echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
+ fi
+ elif $(echo "$(git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
+ echo "$ZSH_THEME_GIT_PROMPT_BEHIND"
+ fi
+}
+
# Formats prompt string for current git commit short SHA
function git_prompt_short_sha() {
SHA=$(git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
1  plugins/zsh-syntax-highlighting
@@ -0,0 +1 @@
+Subproject commit 45194671af8e1d6b37b16e214a58674762ab8e49
View
12 themes/scelis.zsh-theme
@@ -0,0 +1,12 @@
+PROMPT=$'$(prompt_remote_hostname)%{${fg[cyan]}%}%~$(git_prompt_info)%{${fg[default]}%} '
+
+ZSH_THEME_GIT_PROMPT_PREFIX=" %{${fg[yellow]}%}("
+ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
+ZSH_THEME_GIT_PROMPT_DIRTY="⚡"
+ZSH_THEME_GIT_PROMPT_CLEAN=""
+ZSH_THEME_GIT_PROMPT_AHEAD="↑"
+ZSH_THEME_GIT_PROMPT_BEHIND="↓"
+ZSH_THEME_GIT_PROMPT_DIVERGED="↕"
+
+ZSH_THEME_REMOTE_HOSTNAME_PREFIX="%{${fg[green]}%}"
+ZSH_THEME_REMOTE_HOSTNAME_SUFFIX="%{${fg[white]}%}:"

No commit comments for this range

Something went wrong with that request. Please try again.