From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28645 invoked by alias); 10 Jun 2013 13:55:27 -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: 17826 Received: (qmail 6410 invoked from network); 10 Jun 2013 13:55:11 -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=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.212.174 as permitted sender) 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== X-Received: by 10.194.216.39 with SMTP id on7mr5583870wjc.4.1370872502944; Mon, 10 Jun 2013 06:55:02 -0700 (PDT) MIME-Version: 1.0 From: Richard Hartmann Date: Mon, 10 Jun 2013 15:54:41 +0200 Message-ID: Subject: Highlighting the command line based on arbitrary rules To: "zsh-users@zsh.org" Content-Type: text/plain; charset=UTF-8 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