Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Highlighting the command line based on arbitrary rules
- X-seq: zsh-users 17826
- From: Richard Hartmann <richih.mailinglist@xxxxxxxxx>
- To: "zsh-users@xxxxxxx" <zsh-users@xxxxxxx>
- Subject: Highlighting the command line based on arbitrary rules
- Date: Mon, 10 Jun 2013 15:54:41 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=OU5S9G/JdxwsIeQ/PBFk49SV9WekMRftRQJlbq4VnvM=; b=wh3znyt3cP+6O+KoXlmi5AW/x61o38JEFih3kh2R5wyFLTxoKCWqfwcgnVbxjCzbDz doiAAa8xeHRXPjWR23YQ0+KCB9SeyX0TrBYhHcSfTbbI0sILZgty+MKKWwLh+ATP2znD y8+UM8wcKRiheEAy0Fjj2tsu9vjPG9Ap+JxE1YbJjRs9jHO6B4CZ/A8J3glMjR9pJsw7 MKxBbSscAmrRdOzgWX6x+bEn1A7BgpErowt/iwBp9OpDrbn7k7SB4uJcuiyC1GqgLNLh ghkxtVArLb2TXSNU60A2E5GoHAuTchtrYLJplFn6v0/6b/pmhV4Z4ccrQQ32ciLXKqOy K8cw==
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
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