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

Highlighting the command line based on arbitrary rules



Dear all,

this may be approaching the clinically and/or criminally insane, but
is it possible to highlight sections of the command based on arbitrary
rules?

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'

I would want everything after 'general' would be highlighted and,
ideally, not run the highlighting code unless `git ` is at the
beginning of the command line.


Again, this may be a really stupid, or even impossible, idea but being
stuck at an airport without Internet connection but a git repo, a TODO
list, and a massive hangover make this look good.


Thanks,
Richard



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