From: Frank Terbeck Date: Mon, 4 Mar 2013 18:20:46 +0000 (+0100) Subject: zshrc: New prompt: Register prompt theme with promptsys X-Git-Tag: v0.8.0~51 X-Git-Url: http://git.grml.org/?a=commitdiff_plain;ds=sidebyside;h=6c4346c3c7233655a9448f896ec708e11ce10ae1;p=grml-etc-core.git zshrc: New prompt: Register prompt theme with promptsys This requires a little more care, since promptinit only picks up themes from $fpath; which we don't do. We define the prompt directly in the zshrc file. Signed-off-by: Frank Terbeck --- diff --git a/etc/zsh/zshrc b/etc/zsh/zshrc index 8829578..305155e 100644 --- a/etc/zsh/zshrc +++ b/etc/zsh/zshrc @@ -1351,6 +1351,13 @@ function prompt_grml_precmd () { # set prompt if zrcautoload promptinit && promptinit 2>/dev/null ; then promptinit # people should be able to use their favourite prompt + + # Since we define the required functions in here and not in files in + # $fpath, we need to stick the theme's name into `$prompt_themes' + # ourselves, since promptinit does not pick them up otherwise. + prompt_themes+=( grml ) + # Also, keep the array sorted... + prompt_themes=( "${(@on)prompt_themes}" ) else print 'Notice: no promptinit available :(' fi