From ec9febf8cfe63dca6f0e6f309e0a8a07a950e43e Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Wed, 25 Jul 2012 09:41:41 +0530 Subject: [PATCH] Fix themes not being loaded. The `-`'s were being replaced to `_`'s even in the value of the given argument, whereas the intention was to just replace them in the name of the argument. This is now fixed. --- antigen.zsh | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index ad2ff1f..4677d78 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -34,14 +34,17 @@ antigen-bundle () { # Set spec values from keyword arguments, if any. The remaining arguments # are all assumed to be keyword arguments. while [[ $1 == --* ]]; do - # Remove the `--` at the start and replace the rest of `-`'s to `_`'s. - local arg="${${1#--}//-/_}" + # Remove the `--` at the start. + local arg="${1#--}" if [[ $arg != *=* ]]; then arg="$arg=true" fi - local arg_name="${arg%\=*}" + # Get the name of the arg and replace the `-`'s to `_`'s. + local arg_name="${${arg%\=*}//-/_}" + + # Get the value of the arg. local arg_value="${arg#*\=}" eval "local $arg_name='$arg_value'" -- 2.0.0