From 870a5128d3db75a34f72c52e839b7685476e3dfb Mon Sep 17 00:00:00 2001 From: Ayaz Badouraly <ayaz.badouraly@via.ecp.fr> Date: Wed, 28 Dec 2016 00:00:15 +0100 Subject: [PATCH] Improving argument passing --- functions/utils.zsh | 2 +- via.zsh-theme | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/functions/utils.zsh b/functions/utils.zsh index c9b3b8a..eac7417 100644 --- a/functions/utils.zsh +++ b/functions/utils.zsh @@ -16,7 +16,7 @@ set_default () { # /!\ compute differently with color variables # TODO make the regex case-insensitive if [[ $1 =~ '_COLOR(_.*)?$' ]]; then - set_default_color $1 $2 + set_default_color "$@" else # See http://zsh.sourceforge.net/Doc/Release/Expansion.html#Parameter-Expansion-Flags [[ -z ${(P)1} ]] && typeset -g $1=$2 diff --git a/via.zsh-theme b/via.zsh-theme index 0953d27..f981a92 100644 --- a/via.zsh-theme +++ b/via.zsh-theme @@ -72,6 +72,8 @@ eval +vi-theme-$OHMYVIA_VCS_THEME zstyle ':vcs_info:*' formats " $OHMYVIA_VCS_PROMPT_NORMAL" zstyle ':vcs_info:*' actionformats " $OHMYVIA_VCS_PROMPT_ACTION" +# Override precmd to update vcs_info_msg_0_ before prompt. +# See http://zsh.sourceforge.net/Doc/Release/Functions.html#Hook-Functions precmd () { vcs_info } RPROMPT='${vcs_info_msg_0_}' -- GitLab