head 1.3; access; symbols; locks; strict; comment @# @; 1.3 date 2007.09.18.12.41.48; author rse; state Exp; branches; next 1.2; commitid DcYCojHACBA8tdys; 1.2 date 2007.09.11.15.21.37; author rse; state Exp; branches; next 1.1; commitid CK9RY5lBMxLUzkxs; 1.1 date 2007.09.10.08.41.11; author rse; state Exp; branches; next ; commitid RYTrIu0hy4jxoaxs; desc @@ 1.3 log @somewhat colorize 'mtn update' output @ text @## ## monotone-colorize -- colorize output of mtn(1) ## Copyright (c) 2007 Ralf S. Engelschall ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ## General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, ## USA, or contact Ralf S. Engelschall . ## ## monotone-colorize.bashrc: shell integration (language: GNU Bash) ## # wrap mtn(1) command for colorization via monotone-colorize(1) mtn () { case "$1" in u|up|upd|upda|updat|update ) shift @@l_prefix@@/bin/mtn update ${1+"$@@"} 2>&1 |\ @@l_prefix@@/bin/monotone-colorize update ;; s|st|sta|stat|statu|status ) shift @@l_prefix@@/bin/mtn status ${1+"$@@"} |\ @@l_prefix@@/bin/monotone-colorize status ;; l|lo|log ) shift @@l_prefix@@/bin/mtn log ${1+"$@@"} |\ @@l_prefix@@/bin/monotone-colorize log ;; d|di|dif|diff ) shift @@l_prefix@@/bin/mtn --quiet diff --no-show-header ${1+"$@@"} |\ @@l_prefix@@/bin/monotone-colorize diff ;; ls|l|li|lis|list ) case "$2" in t|ta|tag|tags ) shift; shift @@l_prefix@@/bin/mtn list tags ${1+"$@@"} |\ @@l_prefix@@/bin/monotone-colorize list-tags ;; b|br|bra|bran|branc|branch|branche|branches ) shift; shift @@l_prefix@@/bin/mtn list branches ${1+"$@@"} |\ @@l_prefix@@/bin/monotone-colorize list-branches ;; * ) @@l_prefix@@/bin/mtn ${1+"$@@"} ;; esac ;; * ) @@l_prefix@@/bin/mtn ${1+"$@@"} ;; esac } @ 1.2 log @add colorization of 'mtn list tags' and 'mtn list branches' commands @ text @d26 5 @ 1.1 log @enable my RSE patchset by default and provide my partial mtn(1) command colorization @ text @d41 17 @