Commit 7a2ca5936176a8f060dcaad73ef97338bcddadbe

Authored by Shrikant Sharat
1 parent 8bba7ab707

Allow whitespace in the arguments spec.

Showing 2 changed files with 6 additions and 2 deletions Side-by-side Diff

... ... @@ -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 () {
1 1 Helper alias.
2 2  
3   - $ alias parse='-antigen-parse-args "url?,loc?;btype:?,no-local-clone?"'
  3 + $ alias parse='-antigen-parse-args "url?, loc?;
  4 + > btype:?, no-local-clone?"'
4 5  
5 6 No arguments (since all are specified as optional).
6 7