From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28565 invoked by alias); 10 Jun 2013 15:24:29 -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: 17827 Received: (qmail 9095 invoked from network); 10 Jun 2013 15:24:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130610082330.ZM29057@torch.brasslantern.com> Date: Mon, 10 Jun 2013 08:23:30 -0700 In-reply-to: Comments: In reply to Richard Hartmann "Highlighting the command line based on arbitrary rules" (Jun 10, 3:54pm) References: X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: "zsh-users@zsh.org" Subject: Re: Highlighting the command line based on arbitrary rules MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jun 10, 3:54pm, Richard Hartmann wrote: } } this may be approaching the clinically and/or criminally insane, but } is it possible to highlight sections of the command based on arbitrary } rules? Definitely. Google for zsh-syntax-highlight for an extreme example. Somebody probably even has a git plugin for that, but it's difficult to search for, because of course the project is stored in github so the addition of "git" to the search keywords is not helpful. One caveat is that zsh-syntax-highlighting is currently known to tickle an obscure memory management bug somewhere in the depths of ZLE. We're still hoping for somebody who can reproduce it to give us a valgrind or similar debugging output. } My specific use case is to detect git commit message subjects which } are longer than the recommended 50 characters as such: } } git commit foo/bar -m 'foo/bar: More gizmos, less snafus, and a } general disregard of subject length' Yeah, I've been noticing that a bunch of us old CVS-heads (myself included) don't particularly bother with including a "subject" in our commit messages. -- Barton E. Schaefer