From a2160b0add55eb2207ec3a008e940f555e6245bf Mon Sep 17 00:00:00 2001 From: Maxim Moseychuk Date: Thu, 7 May 2015 19:21:18 +0300 Subject: [PATCH] Schroot plugin --- lib/prompt_info_functions.zsh | 4 ++-- plugins/schroot/schroot.plugin.zsh | 16 ++++++++++++++++ 2 files changed, 18 insertions(+), 2 deletions(-) create mode 100644 plugins/schroot/schroot.plugin.zsh diff --git a/lib/prompt_info_functions.zsh b/lib/prompt_info_functions.zsh index 335c02a3d..5322e92c2 100644 --- a/lib/prompt_info_functions.zsh +++ b/lib/prompt_info_functions.zsh @@ -11,8 +11,8 @@ # errors with themes, that implement these functions # Real implementations will be used when the respective plugins are loaded function chruby_prompt_info hg_prompt_info pyenv_prompt_info \ - rbenv_prompt_info svn_prompt_info vi_mode_prompt_info \ - virtualenv_prompt_info { + rbenv_prompt_info schroot_prompt_info svn_prompt_info \ + vi_mode_prompt_info virtualenv_prompt_info { return 1 } diff --git a/plugins/schroot/schroot.plugin.zsh b/plugins/schroot/schroot.plugin.zsh new file mode 100644 index 000000000..f886b7378 --- /dev/null +++ b/plugins/schroot/schroot.plugin.zsh @@ -0,0 +1,16 @@ +################################################################### +# Show current schroot +# +# Author: +# https://github.com/fshp +# +# You need modify theme +# The theme can be obtained here: +# https://github.com/fshp/schroot.zsh-theme +################################################################### + +function schroot_prompt_info() { + if [ -n "$SCHROOT_CHROOT_NAME" ]; then + echo "${ZSH_THEME_SCHROOT_PROMPT_PREFIX}${SCHROOT_CHROOT_NAME}${ZSH_THEME_SCHROOT_PROMPT_SUFFIX}" + fi +}