From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21017 invoked by alias); 17 Feb 2010 07:25:38 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 27717 Received: (qmail 8090 invoked from network); 17 Feb 2010 07:25:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS autolearn=ham version=3.2.5 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: zsh-workers@zsh.org Subject: PATCH: vcs_info: Fix a bug in vcs_info_lastmsg Date: Wed, 17 Feb 2010 08:17:43 +0100 Message-Id: <1266391063-16912-1-git-send-email-ft@bewatermyfriend.org> X-Mailer: git-send-email 1.7.0 X-Df-Sender: 430444 When a format starts with a dash, that triggers bad option errors in some builtins. This should fix it. Regards, Frank --- Functions/VCS_Info/vcs_info_lastmsg | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Functions/VCS_Info/vcs_info_lastmsg b/Functions/VCS_Info/vcs_info_lastmsg index fe33590..ddfaaf8 100644 --- a/Functions/VCS_Info/vcs_info_lastmsg +++ b/Functions/VCS_Info/vcs_info_lastmsg @@ -9,11 +9,11 @@ local -ix maxexports VCS_INFO_maxexports for i in {0..$((maxexports - 1))} ; do - printf '$vcs_info_msg_%d_: "' $i + printf -- '$vcs_info_msg_%d_: "' $i if zstyle -T ':vcs_info:formats:command:-all-' use-prompt-escapes ; then - print -nP ${(P)${:-vcs_info_msg_${i}_}} + print -nP -- ${(P)${:-vcs_info_msg_${i}_}} else - print -n ${(P)${:-vcs_info_msg_${i}_}} + print -n -- ${(P)${:-vcs_info_msg_${i}_}} fi printf '"\n' done -- 1.7.0