Commit 7a2ca5936176a8f060dcaad73ef97338bcddadbe
1 parent
8bba7ab707
Allow whitespace in the arguments spec.
Showing 2 changed files with 6 additions and 2 deletions Side-by-side Diff
antigen.zsh
| ... | ... | @@ -21,7 +21,7 @@ antigen-bundle () { |
| 21 | 21 | |
| 22 | 22 | # Parse the given arguments. (Will overwrite the above values). |
| 23 | 23 | eval "$(-antigen-parse-args \ |
| 24 | - 'url?,loc?;branch:?,no-local-clone?,btype:?' \ | |
| 24 | + 'url?, loc? ; branch:?, no-local-clone?, btype:?' \ | |
| 25 | 25 | "$@")" |
| 26 | 26 | |
| 27 | 27 | # Check if url is just the plugin name. Super short syntax. |
| ... | ... | @@ -365,6 +365,9 @@ antigen () { |
| 365 | 365 | local spec="$1" |
| 366 | 366 | shift |
| 367 | 367 | |
| 368 | + # Sanitize the spec | |
| 369 | + spec="$(echo "$spec" | tr '\n' ' ' | sed -r 's/\s+//g')" | |
| 370 | + | |
| 368 | 371 | local code='' |
| 369 | 372 | |
| 370 | 373 | --add-var () { |