From 9b73f092e81dc1eb1e939c2354084266dca5edb8 Mon Sep 17 00:00:00 2001 From: michener Date: Wed, 13 Apr 2011 00:00:21 +0000 Subject: [PATCH] Add lusty hotkeys, and bin/cronic git-svn-id: http://photonzero.com/dotfiles/trunk@94 23f722f6-122a-0410-8cef-c75bd312dd78 --- .vimrc | 16 +--------------- bin/cronic | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 49 insertions(+), 15 deletions(-) create mode 100755 bin/cronic diff --git a/.vimrc b/.vimrc index 2669bfd..ca99dc2 100644 --- a/.vimrc +++ b/.vimrc @@ -66,6 +66,7 @@ let g:Tb_MaxSize=0 let g:Tb_MapCTabSwitchBufs = 1 let g:LustyExplorerSuppressRubyWarning = 1 let g:LustyJugglerSuppressRubyWarning = 1 +let g:LustyJugglerShowKeys = 'a' let mapleader = "," let g:buftabs_only_basename = 1 "let g:buftabs_in_statusline=1 @@ -138,21 +139,6 @@ set statusline+=%c, "cursor column set statusline+=%l/%L "cursor line/total lines set statusline+=\ %P "percent through file -" Commentary? Maybe remove these, I rarely use them -" , #perl # comments -map ,# :s/^/#/ -" , #mako ## comments -map ,% :s/^/##/ - -" ,/ C/C++/C#/Java // comments -map ,/ :s/^/\/\// - -" ,< HTML comment -map ,< :s/^\(.*\)$//:nohlsearch - -" c++ java style comments -map ,* :s/^\(.*\)$/\/\* \1 \*\//:nohlsearch - " Useful functions " Add capital W so I can be lazy about my shift jey diff --git a/bin/cronic b/bin/cronic new file mode 100755 index 0000000..8536f29 --- /dev/null +++ b/bin/cronic @@ -0,0 +1,48 @@ +#!/bin/bash + +# Cronic v2 - cron job report wrapper +# Copyright 2007 Chuck Houpt. No rights reserved, whatsoever. +# Public Domain CC0: http://creativecommons.org/publicdomain/zero/1.0/ + +set -eu + +OUT=/tmp/cronic.out.$$ +ERR=/tmp/cronic.err.$$ +TRACE=/tmp/cronic.trace.$$ + +set +e +"$@" >$OUT 2>$TRACE +RESULT=$? +set -e + +PATTERN="^${PS4:0:1}\\+${PS4:1}" +if grep -aq "$PATTERN" $TRACE +then + ! grep -av "$PATTERN" $TRACE > $ERR +else + ERR=$TRACE +fi + +if [ $RESULT -ne 0 -o -s "$ERR" ] + then + echo "Cronic detected failure or error output for the command:" + echo "$@" + echo + echo "RESULT CODE: $RESULT" + echo + echo "ERROR OUTPUT:" + cat "$ERR" + echo + echo "STANDARD OUTPUT:" + cat "$OUT" + if [ $TRACE != $ERR ] + then + echo + echo "TRACE-ERROR OUTPUT:" + cat "$TRACE" + fi +fi + +rm -f "$OUT" +rm -f "$ERR" +rm -f "$TRACE"