ef96b6c16e1e59c449ef31d658d3232135a3e482

Author
Peter Tillemans <pti@snamellit.com>
Committer
Peter Tillemans <pti@snamellit.com>
Date

Message

Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
  2index 6f0edb062ac60bba4abc7b5fe84962ba286f8dee..d367863b86f2baff8892278b06259370e0f02164 100644
  3--- a/plugins/autojump/autojump.plugin.zsh
  4+++ b/plugins/autojump/autojump.plugin.zsh
  5@@ -3,6 +3,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed
  6     . /usr/share/autojump/autojump.zsh
  7   elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
  8     . /etc/profile.d/autojump.zsh
  9+  elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
 10+    . /opt/local/etc/profile.d/autojump.zsh
 11   elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump ]; then # mac os x with brew
 12     . `brew --prefix`/etc/autojump
 13   fi
 14diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
 15index 39b76ecdf9d8af6221430461b99c545bae2a804f..2305c49796f58b4ae2e5b79943245f83b0e06448 100644
 16--- a/plugins/bundler/bundler.plugin.zsh
 17+++ b/plugins/bundler/bundler.plugin.zsh
 18@@ -6,7 +6,7 @@ alias bu="bundle update"
 19 
 20 # The following is based on https://github.com/gma/bundler-exec
 21 
 22-bundled_commands=(annotate cap capify cucumber foreman guard middleman nanoc rackup rainbows rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails)
 23+bundled_commands=(annotate cap capify cucumber foreman guard middleman nanoc rackup rainbows rake rspec ruby shotgun spec spork thin thor unicorn unicorn_rails puma)
 24 
 25 ## Functions
 26 
 27diff --git a/plugins/colemak/colemak-less b/plugins/colemak/colemak-less
 28new file mode 100644
 29index 0000000000000000000000000000000000000000..e4ca4facd65707c1f2ada112fb8781664439e637
 30--- /dev/null
 31+++ b/plugins/colemak/colemak-less
 32@@ -0,0 +1,6 @@
 33+n    forw-line
 34+e    back-line
 35+k    repeat-search
 36+\ek  repeat-search-all
 37+K    reverse-search
 38+\eK  reverse-search-all
 39diff --git a/plugins/colemak/colemak.plugin.zsh b/plugins/colemak/colemak.plugin.zsh
 40new file mode 100644
 41index 0000000000000000000000000000000000000000..34d42c280423836a39582089b504d240718a3f35
 42--- /dev/null
 43+++ b/plugins/colemak/colemak.plugin.zsh
 44@@ -0,0 +1,22 @@
 45+# ctrl-j newline
 46+bindkey '^n' accept-line
 47+bindkey -a '^n' accept-line
 48+
 49+# another rotation to match qwerty
 50+bindkey -a 'n' down-line-or-history
 51+bindkey -a 'e' up-line-or-history
 52+bindkey -a 'i' vi-forward-char
 53+
 54+# make qwerty
 55+bindkey -a 'k' vi-repeat-search
 56+bindkey -a 'K' vi-rev-repeat-search
 57+bindkey -a 'u' vi-insert
 58+bindkey -a 'U' vi-insert-bol
 59+bindkey -a 'l' vi-undo-change
 60+bindkey -a 'N' vi-join
 61+
 62+# spare
 63+bindkey -a 'j' vi-forward-word-end
 64+bindkey -a 'J' vi-forward-blank-word-end
 65+
 66+lesskey $ZSH_CUSTOM/plugins/colemak/colemak-less
 67diff --git a/plugins/laravel/_artisan b/plugins/laravel/_artisan
 68new file mode 100644
 69index 0000000000000000000000000000000000000000..8637514cfe97ccf0ce40d208b46c68ebbb8f86bb
 70--- /dev/null
 71+++ b/plugins/laravel/_artisan
 72@@ -0,0 +1,40 @@
 73+#compdef artisan
 74+
 75+# Laravel autocompletion
 76+# Author: John Hamelink <john@johnhamelink.com>
 77+#
 78+# This plugin does the following:
 79+#  - Adds aliases and autocompletion for artisan
 80+#  - Adds aliases and autocompletion for bob
 81+
 82+local curcontext="$curcontext" state line _opts _bundles ret=1
 83+_arguments -C \
 84+    '1: :->cmds' \
 85+    '*:: :->args' && ret=0
 86+
 87+case $state in
 88+    cmds)
 89+
 90+    _values "Artisan command" \
 91+        'session\:install[Create a session table]' \
 92+        'migrate[Manage Migrations]' \
 93+        'test[Run a test]' \
 94+        'route\:\:call[Call a route in the CLI]' \
 95+        'key\:\:generate[Generate a key]'
 96+        ret=0
 97+        ;;
 98+    args)
 99+        case $line[1] in
100+            migrate)
101+                _values \
102+                    'install[Create the Laravel migration table' \
103+                    'make[Create a migration]' \
104+                    'rollback[Roll back to the last migration operation]' \
105+                    'reset[Roll back all migrations that have ever run]'
106+                ret=0
107+                ;;
108+        esac
109+        ;;
110+esac
111+
112+return ret
113diff --git a/plugins/laravel/laravel.plugin.zsh b/plugins/laravel/laravel.plugin.zsh
114new file mode 100644
115index 0000000000000000000000000000000000000000..ed932ee89fae5965f74bdad6cd65a18cfa696640
116--- /dev/null
117+++ b/plugins/laravel/laravel.plugin.zsh
118@@ -0,0 +1,3 @@
119+#!zsh
120+alias artisan='php artisan'
121+alias bob='php artisan bob::build'
122diff --git a/plugins/per-directory-history/per-directory-history.plugin.zsh b/plugins/per-directory-history/per-directory-history.plugin.zsh
123new file mode 100644
124index 0000000000000000000000000000000000000000..22383b8b96cf7ff31738fe4ebf3d9a8f28223e13
125--- /dev/null
126+++ b/plugins/per-directory-history/per-directory-history.plugin.zsh
127@@ -0,0 +1,148 @@
128+#!/usr/bin/env zsh
129+#
130+# This is a implementation of per directory history for zsh, some 
131+# implementations of which exist in bash[1,2].  It also implements 
132+# a per-directory-history-toggle-history function to change from using the 
133+# directory history to using the global history.  In both cases the history is 
134+# always saved to both the global history and the directory history, so the 
135+# toggle state will not effect the saved histories.  Being able to switch 
136+# between global and directory histories on the fly is a novel feature as far 
137+# as I am aware.
138+#
139+#-------------------------------------------------------------------------------
140+# Configuration
141+#-------------------------------------------------------------------------------
142+#
143+# HISTORY_BASE a global variable that defines the base directory in which the 
144+# directory histories are stored
145+#
146+#-------------------------------------------------------------------------------
147+# History
148+#-------------------------------------------------------------------------------
149+#
150+# The idea/inspiration for a per directory history is from Stewart MacArthur[1] 
151+# and Dieter[2], the implementation idea is from Bart Schaefer on the the zsh 
152+# mailing list[3].  The implementation is by Jim Hester in September 2012.
153+#
154+# [1]: http://www.compbiome.com/2010/07/bash-per-directory-bash-history.html
155+# [2]: http://dieter.plaetinck.be/per_directory_bash
156+# [3]: http://www.zsh.org/mla/users/1997/msg00226.html
157+#
158+################################################################################
159+#
160+# Copyright (c) 2012 Jim Hester
161+#
162+# This software is provided 'as-is', without any express or implied warranty.  
163+# In no event will the authors be held liable for any damages arising from the 
164+# use of this software.
165+#
166+# Permission is granted to anyone to use this software for any purpose, 
167+# including commercial applications, and to alter it and redistribute it 
168+# freely, subject to the following restrictions:
169+#
170+# 1. The origin of this software must not be misrepresented; you must not claim 
171+# that you wrote the original software. If you use this software in a product, 
172+# an acknowledgment in the product documentation would be appreciated but is 
173+# not required.
174+#
175+# 2. Altered source versions must be plainly marked as such, and must not be 
176+# misrepresented as being the original software.
177+#
178+# 3. This notice may not be removed or altered from any source distribution..
179+#
180+################################################################################
181+
182+#-------------------------------------------------------------------------------
183+# configuration, the base under which the directory histories are stored
184+#-------------------------------------------------------------------------------
185+
186+[[ -z $HISTORY_BASE ]] && HISTORY_BASE="$HOME/.directory_history"
187+
188+#-------------------------------------------------------------------------------
189+# toggle global/directory history used for searching - ctrl-G by default
190+#-------------------------------------------------------------------------------
191+
192+function per-directory-history-toggle-history() {
193+  if [[ $_per_directory_history_is_global == true ]]; then
194+    _per-directory-history-set-directory-history
195+    echo "using local history\n"
196+  else
197+    _per-directory-history-set-global-history
198+    echo "using global history\n"
199+  fi
200+  zle reset-prompt
201+}
202+
203+autoload per-directory-history-toggle-history
204+zle -N per-directory-history-toggle-history
205+bindkey '^G' per-directory-history-toggle-history
206+
207+#-------------------------------------------------------------------------------
208+# implementation details
209+#-------------------------------------------------------------------------------
210+
211+_per_directory_history_directory="$HISTORY_BASE${PWD:A}/history"
212+
213+function _per-directory-history-change-directory() {
214+  _per_directory_history_directory="$HISTORY_BASE${PWD:A}/history"
215+  mkdir -p ${_per_directory_history_directory:h}
216+  if [[ $_per_directory_history_is_global == false ]]; then
217+    #save to the global history
218+    fc -AI $HISTFILE
219+    #save history to previous file
220+    local prev="$HISTORY_BASE${OLDPWD:A}/history"
221+    mkdir -p ${prev:h}
222+    fc -AI $prev
223+
224+    #discard previous directory's history
225+    local original_histsize=$HISTSIZE
226+    HISTSIZE=0
227diff --git a/plugins/supervisor/_supervisorctl b/plugins/supervisor/_supervisorctl
228new file mode 100644
229index 0000000000000000000000000000000000000000..d159f20e07f9a384e47e4cc16b78cce80aeeeef6
230--- /dev/null
231+++ b/plugins/supervisor/_supervisorctl
232@@ -0,0 +1,136 @@
233+#compdef supervisorctl
234+
235+typeset -A opt_args
236+local context state line
237+
238+_supervisorctl() {
239+    _arguments -s -S \
240+        {--configuration,-c}"[configuration file path (default /etc/supervisor.conf)]:FILENAME:_files" \
241+        {--help,-h}"[print usage message and exit]:" \
242+        {--interactive,-i}"[start an interactive shell after executing commands]" \
243+        {--serverurl,-s}"[URL on which supervisord server is listening (default "http://localhost:9001").]" \
244+        {--username,-u}"[username to use for authentication with server]:USERNAME:_users" \
245+        {--password,-p}"[password to use for authentication with server]:PASSWORD:" \
246+        {--history-file,-r}"[keep a readline history (if readline is available)]:FILENAME:_files" \
247+        "*::supervisorctl commands:_supervisorctl_command"
248+}
249+
250+(( $+functions[_supervisorctl_command] )) ||
251+_supervisorctl_command() {
252+    local cmd ret=1
253+
254+    (( $+supervisorctl_cmds )) || _supervisorctl_cmds=(
255+        "add:Activates any updates in config for process/group" \
256+        "avail:Display all configured processes" \
257+        "clear:Clear process/multiple-process/all-process log files" \
258+        "exit:Exit the supervisor shell." \
259+        "fg:Connect to a process in foreground mode" \
260+        "maintail:tail of supervisor main log file" \
261+        "open:Connect to a remote supervisord process. (for UNIX domain socket, use unix:///socket/path)" \
262+        "pid:Get the PID of supervisord." \
263+        "quit:Exit the supervisor shell." \
264+        "reload:Restart the remote supervisord." \
265+        "remove:Removes process/group from active config" \
266+        "reread:Reload the daemon's configuration files" \
267+        "restart:Restart process or group." \
268+        "shutdown:Shut the remote supervisord down." \
269+        "start:Start process or groups." \
270+        "status:Get process status info." \
271+        "stop:Stop process or group." \
272+        "tail:tail of process stdout" \
273+        "update:Reload config and add/remove as necessary" \
274+        "version:Show the version of the remote supervisord process" \
275+        "help:Show help" \
276+        )
277+
278+    if (( CURRENT == 1 )); then
279+        _describe -t commands 'supervisorctl subcommand' _supervisorctl_cmds \
280+            || compadd "$@" - ${(s.:.)${(j.:.)_supervisorctl_syns}}
281+    else
282+        local curcontext="$curcontext"
283+
284+        cmd="${${_supervisorctl_cmds[(r)$words[1]:*]%%:*}:-${(k)_supervisorctl_syns[(r)(*:|)$words[1](:*|)]}}"
285+        if (( $#cmd )); then
286+            curcontext="${curcontext%:*:*}:supervisorctl-${cmd}:"
287+            _call_function ret _supervisorctl_$cmd || _message 'no more arguments'
288+        else
289+            _message "unknown supervisorctl command: $words[1]"
290+        fi
291+        return ret
292+    fi
293+}
294+
295+# get supervisor contoroll processes
296+(( $+functions[_get_supervisor_procs] )) ||
297+_get_supervisor_procs() {
298+    local cache_policy
299+    zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
300+    if [[ -z "$cache_policy" ]]; then
301+        zstyle ":completion:${curcontext}:" cache-policy _supervisor_procs_caching_policy
302+    fi
303+
304+    if ( [[ ${+_supervisor_procs} -eq 0 ]] || _cache_invalid supervisor_procs ) \
305+        && ! _retrieve_cache supervisor_procs; then
306+
307+        _supervisor_procs=(${${(f)"$(supervisorctl status >/dev/null 2>&1 | awk -F' ' '{print $1}')"}})
308+        _store_cache supervisor_procs _supervisor_procs
309+    fi
310+
311+    local expl
312+    _wanted supervisor_procs expl 'supervisor processes' compadd -a _supervisor_procs
313+}
314+
315+_supervisor_procs_caching_policy() {
316+    local -a oldp
317+    oldp=( "$1"(Nmw+1) )
318+    (( $#oldp ))
319+}
320+
321+(( $+functions[_supervisorctl_add] )) ||
322+_supervisorctl_add() {
323+    _arguments -s \
324+        "--help[use help system]" \
325+        "*::supervisorctl commands:_supervisorctl"
326+}
327+
328+(( $+functions[_supervisorctl_help] )) ||
329+_supervisorctl_help() {
330+    _arguments -s \
331+        "*:supervisorctl commands:_supervisorctl"
332diff --git a/plugins/supervisor/_supervisord b/plugins/supervisor/_supervisord
333new file mode 100644
334index 0000000000000000000000000000000000000000..34d27805dd1f9d1d3444786073c93e86c44eda31
335--- /dev/null
336+++ b/plugins/supervisor/_supervisord
337@@ -0,0 +1,32 @@
338+#compdef supervisord
339+
340+typeset -A opt_args
341+local context state line
342+
343+_arguments \
344+    {--configuration,-c}"[configuration file]:FILENAME:_files" \
345+    {--nodaemon,-n}"[run in the foreground (same as 'nodaemon true' in config file)]" \
346+    {--help,-h}"[print this usage message and exit]:" \
347+    {--user,-u}"[run supervisord as this user]:USER:_users" \
348+    {--umask,-m}"[use this umask for daemon subprocess (default is 022)]" \
349+    {--directory,-d}"[directory to chdir to when daemonized]" \
350+    {--logfile,-l}"[use FILENAME as logfile path]:FILENAME:_files" \
351+    {--logfile_maxbytes,-y}"[use BYTES to limit the max size of logfile]" \
352+    {--logfile_backups,-z}"[number of backups to keep when max bytes reached]" \
353+    {--loglevel,-e}"[use LEVEL as log level (debug,info,warn,error,critical)]:level:->levels" \
354+    {--pidfile,-j}"[write a pid file for the daemon process to FILENAME]:FILENAME:_files" \
355+    {--identifier,-i}"[identifier used for this instance of supervisord]" \
356+    {--childlogdir,-q}"[the log directory for child process logs]:child log directory:_files -/" \
357+    {--nocleanup,-k}"[prevent the process from performing cleanup (removal of old automatic child log files) at startup.]" \
358+    {--minfds,-a}"[the minimum number of file descriptors for start success]" \
359+    {--strip_ansi,-t}"[strip ansi escape codes from process output]" \
360+    "--minprocs[the minimum number of processes available for start success]" \
361+    "--profile_options[run supervisord under profiler and output results based on OPTIONS, which is a comma-sep'd list of 'cumulative', 'calls', and/or 'callers', e.g. 'cumulative,callers')]" \
362+    "*::args:_gnu_generic"
363+
364+case $state in
365+levels)
366+    levels=("debug" "info" "warn" "error" "critical")
367+    _describe -t levels 'supervisord levels' levels && return 0
368+    ;;
369+esac
370diff --git a/plugins/supervisor/supervisor.plugin.zsh b/plugins/supervisor/supervisor.plugin.zsh
371new file mode 100644
372index 0000000000000000000000000000000000000000..cf1997c5be62ffeebc99253cced7608415e38e4e
373--- /dev/null
374+++ b/plugins/supervisor/supervisor.plugin.zsh
375@@ -0,0 +1 @@
376+# DECLARION: This plugin was created by hhatto. What I did is just making a portal from https://bitbucket.org/hhatto/zshcompfunc4supervisor.
377diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
378index c47ab72114562251e4ca75f1395dcaea1abe2002..d29eb1dda85de0b8aa9416643166c5f4081d468b 100644
379--- a/plugins/vi-mode/vi-mode.plugin.zsh
380+++ b/plugins/vi-mode/vi-mode.plugin.zsh
381@@ -5,7 +5,12 @@ function zle-line-init zle-keymap-select {
382 zle -N zle-line-init
383 zle -N zle-keymap-select
384 
385+#changing mode clobbers the keybinds, so store the keybinds before and execute 
386+#them after
387+binds=`bindkey -L`
388 bindkey -v
389+for bind in ${(@f)binds}; do eval $bind; done
390+unset binds
391 
392 # if mode indicator wasn't setup by theme, define default
393 if [[ "$MODE_INDICATOR" == "" ]]; then
394diff --git a/themes/3den.zsh-theme b/themes/3den.zsh-theme
395new file mode 100644
396index 0000000000000000000000000000000000000000..1d2c7db7f182583189b42f71101a627c04d62c9d
397--- /dev/null
398+++ b/themes/3den.zsh-theme
399@@ -0,0 +1,7 @@
400+PROMPT=$'%{$fg[white]%}$(~/.rvm/bin/rvm-prompt) %{$fg_bold[cyan]%}%~%{$reset_color%}$(git_prompt_info) %{$fg[cyan]%}%D{[%I:%M:%S]}\
401+%{$fg_bold[green]%}%n$%{$reset_color%} '
402+
403+ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}("
404+ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}"
405+ZSH_THEME_GIT_PROMPT_DIRTY="*"
406+ZSH_THEME_GIT_PROMPT_CLEAN=""
407diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
408new file mode 100644
409index 0000000000000000000000000000000000000000..c3107c06c04fb42b0ca27b0a81b15854819969c6
410--- /dev/null
411+++ b/themes/agnoster.zsh-theme
412@@ -0,0 +1,115 @@
413+# vim:ft=zsh ts=2 sw=2 sts=2
414+#
415+# agnoster's Theme - https://gist.github.com/3712874
416+# A Powerline-inspired theme for ZSH
417+#
418+# # README
419+#
420+# In order for this theme to render correctly, you will need a
421+# [Powerline-patched font](https://gist.github.com/1595572).
422+#
423+# In addition, I recommend the
424+# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
425+# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -
426+# it has significantly better color fidelity.
427+#
428+# # Goals
429+#
430+# The aim of this theme is to only show you *relevant* information. Like most
431+# prompts, it will only show git information when in a git working directory.
432+# However, it goes a step further: everything from the current user and
433+# hostname to whether the last call exited with an error to whether background
434+# jobs are running in this shell will all be displayed automatically when
435+# appropriate.
436+
437+### Segment drawing
438+# A few utility functions to make it easy and re-usable to draw segmented prompts
439+
440+CURRENT_BG='NONE'
441+SEGMENT_SEPARATOR='⮀'
442+
443+# Begin a segment
444+# Takes two arguments, background and foreground. Both can be omitted,
445+# rendering default background/foreground.
446+prompt_segment() {
447+  local bg fg
448+  [[ -n $1 ]] && bg="%K{$1}" || bg="%k"
449+  [[ -n $2 ]] && fg="%F{$2}" || fg="%f"
450+  if [[ $CURRENT_BG != 'NONE' && $1 != $CURRENT_BG ]]; then
451+    echo -n " %{$bg%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR%{$fg%} "
452+  else
453+    echo -n "%{$bg%}%{$fg%} "
454+  fi
455+  CURRENT_BG=$1
456+  [[ -n $3 ]] && echo -n $3
457+}
458+
459+# End the prompt, closing any open segments
460+prompt_end() {
461+  if [[ -n $CURRENT_BG ]]; then
462+    echo -n " %{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR"
463+  else
464+    echo -n "%{%k%}"
465+  fi
466+  echo -n "%{%f%}"
467+  CURRENT_BG=''
468+}
469+
470+### Prompt components
471+# Each component will draw itself, and hide itself if no information needs to be shown
472+
473+# Context: user@hostname (who am I and where am I)
474+prompt_context() {
475+  local user=`whoami`
476+
477+  if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
478+    prompt_segment black default "%(!.%{%F{yellow}%}.)$user@%m"
479+  fi
480+}
481+
482+# Git: branch/detached head, dirty status
483+prompt_git() {
484+  local ref dirty
485+  if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
486+    ZSH_THEME_GIT_PROMPT_DIRTY='±'
487+    dirty=$(parse_git_dirty)
488+    ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)"
489+    if [[ -n $dirty ]]; then
490+      prompt_segment yellow black
491+    else
492+      prompt_segment green black
493+    fi
494+    echo -n "${ref/refs\/heads\//⭠ }$dirty"
495+  fi
496+}
497+
498+# Dir: current working directory
499+prompt_dir() {
500+  prompt_segment blue black '%~'
501+}
502+
503+# Status:
504+# - was there an error
505+# - am I root
506+# - are there background jobs?
507+prompt_status() {
508+  local symbols
509+  symbols=()
510+  [[ $RETVAL -ne 0 ]] && symbols+="%{%F{red}%}✘"
511+  [[ $UID -eq 0 ]] && symbols+="%{%F{yellow}%}⚡"
512diff --git a/themes/jnrowe.zsh-theme b/themes/jnrowe.zsh-theme
513index 7c8a7082e96696931d797f1e847d7eeef2f4c581..bae88f7abc6269d4eea700a47d8cf270cdb1fa63 100644
514--- a/themes/jnrowe.zsh-theme
515+++ b/themes/jnrowe.zsh-theme
516@@ -2,15 +2,14 @@ autoload -U add-zsh-hook
517 autoload -Uz vcs_info
518 
519 zstyle ':vcs_info:*' actionformats \
520-    '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
521-zstyle ':vcs_info:*' formats \
522-    '%F{2}%s%F{7}:%F{2}(%F{1}%b%F{2})%f '
523+       '%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
524+zstyle ':vcs_info:*' formats '%F{2}%s%F{7}:%F{2}(%F{1}%b%F{2})%f '
525 zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
526 zstyle ':vcs_info:*' enable git
527 
528-add-zsh-hook precmd prompt_jnrowe_precmd
529+add-zsh-hook precmd prompt_vcs
530 
531-prompt_jnrowe_precmd () {
532+prompt_vcs () {
533     vcs_info
534 
535     if [ "${vcs_info_msg_0_}" = "" ]; then
536@@ -24,8 +23,16 @@ prompt_jnrowe_precmd () {
537     fi
538 }
539 
540+function {
541+    if [[ -n "$SSH_CLIENT" ]]; then
542+        PROMPT_HOST=" ($HOST)"
543+    else
544+        PROMPT_HOST=''
545+    fi
546+}
547+
548 local ret_status="%(?:%{$fg_bold[green]%}Ξ:%{$fg_bold[red]%}%S↑%s%?)"
549 
550-PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg_bold[yellow]%}%2~ ${vcs_info_msg_0_}${dir_status}%{$reset_color%} '
551+PROMPT='${ret_status}%{$fg[blue]%}${PROMPT_HOST}%{$fg_bold[green]%}%p %{$fg_bold[yellow]%}%2~ ${vcs_info_msg_0_}${dir_status}%{$reset_color%} '
552 
553 #  vim: set ft=zsh ts=4 sw=4 et: