From: Richard Hartmann <richih.mailinglist@gmail.com>
To: "zsh-users@zsh.org" <zsh-users@zsh.org>
Subject: Highlighting the command line based on arbitrary rules
Date: Mon, 10 Jun 2013 15:54:41 +0200 [thread overview]
Message-ID: <CAD77+gThLoy0pvRrEYbMhCEG=-oTXGCJHWv_+3WfRdMwv+EjKw@mail.gmail.com> (raw)
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
next reply other threads:[~2013-06-10 13:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-06-10 13:54 Richard Hartmann [this message]
2013-06-10 15:23 ` Bart Schaefer
2013-06-10 15:37 ` Jérémie Roquet
2013-06-10 15:38 ` Richard Hartmann
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAD77+gThLoy0pvRrEYbMhCEG=-oTXGCJHWv_+3WfRdMwv+EjKw@mail.gmail.com' \
--to=richih.mailinglist@gmail.com \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).