From c1479baff862e554946839b249cc4a9226b57674 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Fri, 20 Jul 2012 15:56:50 +0530 Subject: [PATCH] Accept a --verbose option to -ensure-repo command. This will be used to make the -ensure-repo command output more detailed information on the changes, if any, made to the clone. --- antigen.zsh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index 2566b37..18ce4c4 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -140,12 +140,17 @@ antigen-update () { # argument is `--update` and if a clone already exists for the given repo # and branch, it is pull-ed, i.e., updated. + # Argument defaults. # Check if we have to update. local update=false - if [[ $1 == --update ]]; then - update=true + # Verbose output. + local verbose=false + + # Load any boolean arguments specified. + while [[ $1 == --* ]]; do + eval "local '${1#--}=true'" shift - fi + done # Get the clone's directory as per the given repo url and branch. local url="$1" -- 2.0.0