Skip to content
Snippets Groups Projects
Commit 870a5128 authored by Ayaz Badouraly's avatar Ayaz Badouraly
Browse files

Improving argument passing

parent 2dfeb1ee
Branches
No related tags found
No related merge requests found
......@@ -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
......
......@@ -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_}'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment