From df942673b3e24ad09aca81a883fb6066579498f4 Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Tue, 5 Jun 2012 20:58:09 +0530 Subject: [PATCH] Added bundle-list command. The `bundle-list` command is used to list the currently specified bundles. --- antigen.zsh | 10 ++++++++++ tests/main.t | 7 ++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/antigen.zsh b/antigen.zsh index 5b87f4e..407645a 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -215,6 +215,16 @@ bundle-apply () { compinit -i } +bundle-list () { + # List all currently installed bundles + if [[ -z "$bundles" ]]; then + echo "You don't have any bundles." >&2 + return 1 + else + echo-non-empty "$bundles" | awk '{print $1 " " $2 " " $3}' + fi +} + # Does what it says. echo-non-empty () { echo "$@" | while read line; do diff --git a/tests/main.t b/tests/main.t index 2dbf2d6..915eb3c 100644 --- a/tests/main.t +++ b/tests/main.t @@ -1,3 +1,8 @@ Load antigen - $ bundle-cleanup + $ bundle-list + You don't have any bundles. + [1] + $ bundle lol + $ bundle-list + lol https://github.com/robbyrussell/oh-my-zsh.git plugins/lol -- 2.0.0