From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18426 invoked by alias); 10 Jan 2016 20:11:33 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 21145 Received: (qmail 23586 invoked from network); 10 Jan 2016 20:11:32 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=from:message-id:date:in-reply-to:comments:references:to:subject :mime-version:content-type; bh=M1agPE8eVswoa59YULMvNOZAyTMnKhEa6aG4z7WVFYo=; b=NzJNxZkh+l8A+OG5WoIw/3GwHARQSdvhFiZCyXqGT6WjTcbZQIgwHb4+f2tcx3Fpt/ 3jk6oH0VBLQMUG3VPSEMPP0ROyadb6CwXWbe1lB2BK63gASz0nSk9prqgTDjebj1ohV5 ofBYpJgZpCzihbhI/Za9tRhS40MZjmbRLgAeZiRYXShLf2gc7Ewb6bMncvqqIVAkSir9 JSJ0OVcK8LPanTflYzYFXT7eWo2/L98/soE5NhD05o4qzEJz2XdkUKZyNR9c2BNyhf9z OEIqPZzfZ4/XPrbyFZOcVQoFt7Dw0jeoiF0spYB3vruRNco7VQueaZpadVm62hSx+xCM nLdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=M1agPE8eVswoa59YULMvNOZAyTMnKhEa6aG4z7WVFYo=; b=czMVnyOZFjsk4Eb+r2hZFEx+OKVNVjPuJu5zco6GgzadmiwG0cBSon8Ij3Ddwb+lBI hufxbwI+tsaVqqW8aO5+Olh/G6Jmu4Gv3sCERTjEts7kuxr2ChmyfV95I4/t+Yq/SlLC sgZhbnfWaxEuIJSR1GufQcljDZlveENrtEvIjlg5HuNh5e+XAig3r/Mc/BNakdAhoBb1 SvFjV/OlCz9CNhgw6LFEU0rxwS/6aed/puezHaMhLqeiz+AKt+qeTE291eMdsXclJGJR +rfij2H7kQFjPp0pspdFy/woLPu5X0REeyR49vOxucw/USEzZF/evTQcix0Ry1McwVvj Aiqg== X-Gm-Message-State: ALoCoQm7eHfDLBjWhI7zQXSqhTgKBDdYS3Yx4u1VIm3GIL50gqCrccR9FXK978M2mAaeLnykkE9bXdMcm7HDFNkSCZ7o9kOqWw== X-Received: by 10.98.7.79 with SMTP id b76mr21380384pfd.40.1452456691263; Sun, 10 Jan 2016 12:11:31 -0800 (PST) From: Bart Schaefer Message-Id: <160110121143.ZM1147@torch.brasslantern.com> Date: Sun, 10 Jan 2016 12:11:43 -0800 In-Reply-To: Comments: In reply to Sebastian Gniazdowski "Re: Somehow my prompt broke in 5.2" (Jan 10, 8:46am) References: <160106204452.ZM11191@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Zsh Users Subject: Re: Somehow my prompt broke in 5.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 10, 8:46am, Sebastian Gniazdowski wrote: } Subject: Re: Somehow my prompt broke in 5.2 } } On 7 January 2016 at 05:44, Bart Schaefer wrote: } > } > Delete line 7 ( local -a msgs ) from VCS_INFO_nvcsformats and you } > should be good to go. If you have problems with WARN_CREATE_GLOBAL, } > add that same line to Functions/VCS_Info/vcs_info instead. } } Would be cool if this could be somehow workarounded in .zshrc, so that } one can have robust configuration that will work anywhere right after } install. This is the reason for $fpath and for the rigorous adherence to search order that kept annoying Ray. You make the fix to the function source, put it in a directory under $HOME or in some well-known system location, and make sure that directory appears in $fpath ahead of the standard directory for the zsh install. I personally have several such directories named with portions of the zsh version string and sort fpath so that they're loaded in version order. That way I can add new functions at the version where the base changes they require are present, and they're always in the fpath (just later on) as new versions of the shell appear. If you want something that works purely in .zshrc, you can do something more fragile but along these lines: autoload +X VCS_INFO_nvcsformats functions[VCS_INFO_nvcsformats]=${functions[VCS_INFO_nvcsformats]/local -a msgs/} (not thoroughly tested). } One could at least add a warning to .zshrc that } would somehow detect if modifications aren't in place for given zsh. The problem is that every such modification would require its own bit of custom test to detect, and some might not be detectable at all except with user interaction. Not only is it difficult to maintain all those tests, it makes shell startup very slow.