Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Highlighting the command line based on arbitrary rules

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

Messages sorted by: Reverse Date, Date, Thread, Author