Commit ec9febf8cfe63dca6f0e6f309e0a8a07a950e43e
1 parent
38b0b0409e
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.
Showing 1 changed file with 6 additions and 3 deletions Side-by-side Diff
antigen.zsh
... | ... | @@ -34,14 +34,17 @@ antigen-bundle () { |
34 | 34 | # Set spec values from keyword arguments, if any. The remaining arguments |
35 | 35 | # are all assumed to be keyword arguments. |
36 | 36 | while [[ $1 == --* ]]; do |
37 | - # Remove the `--` at the start and replace the rest of `-`'s to `_`'s. | |
38 | - local arg="${${1#--}//-/_}" | |
37 | + # Remove the `--` at the start. | |
38 | + local arg="${1#--}" | |
39 | 39 | |
40 | 40 | if [[ $arg != *=* ]]; then |
41 | 41 | arg="$arg=true" |
42 | 42 | fi |
43 | 43 | |
44 | - local arg_name="${arg%\=*}" | |
44 | + # Get the name of the arg and replace the `-`'s to `_`'s. | |
45 | + local arg_name="${${arg%\=*}//-/_}" | |
46 | + | |
47 | + # Get the value of the arg. | |
45 | 48 | local arg_value="${arg#*\=}" |
46 | 49 | |
47 | 50 | eval "local $arg_name='$arg_value'" |