Commit 3c5ff1c1e2d09d35963ca574b4dd57e7e6a2b7b2
1 parent
a4f6e2fc87
Add antigen-bundles command.
This command lets you bulk-add bundles with one command, and piping bundle specs, one on each line into this command. Best used with heredoc syntax.
Showing 1 changed file with 14 additions and 0 deletions Side-by-side Diff
antigen.zsh
| ... | ... | @@ -56,6 +56,20 @@ antigen-bundle () { |
| 56 | 56 | |
| 57 | 57 | } |
| 58 | 58 | |
| 59 | +antigen-bundles () { | |
| 60 | + # Bulk add many bundles at one go. Empty lines and lines starting with a `#` | |
| 61 | + # are ignored. Everything else is given to `antigen-bundle` as is, no | |
| 62 | + # quoting rules applied. | |
| 63 | + | |
| 64 | + local line | |
| 65 | + | |
| 66 | + grep -v '^$\|^#' | while read line; do | |
| 67 | + # Using `eval` so that we can use the shell-style quoting in each line | |
| 68 | + # piped to `antigen-bundles`. | |
| 69 | + eval "antigen-bundle $line" | |
| 70 | + done | |
| 71 | +} | |
| 72 | + | |
| 59 | 73 | antigen-bundle-update () { |
| 60 | 74 | # Update your bundles, i.e., `git pull` in all the plugin repos. |
| 61 | 75 | -antigen-echo-record | awk '{print $1}' | sort -u | while read url; do |