| Josh on 15 Aug 2003 04:31:01 -0000 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
| Re: [hosers-talk] A nifty trick for vi and mh |
Tom Plagge sez:
>So if you're like me, your mh aliases file is completely out of control. I
>don't even remember which aliases I gave to which people. What I really want
>to do is just search it for some text, and have the matching record dumped
>in my To: line, or Cc: line, or whatever. I created a stupid little script
>to do searches, called ~/bin/mha:
>
>#!/bin/sh
>if [ $# -gt 0 ]; then
> grep $1 ~/Mail/aliases | awk '{ for ( i=2; i<NF; i++ ) { printf("%s ", $i) }
> printf("%s\n", $NF) }'
>else
> read -e foobar
> mha $foobar
>fi
>
>But then I had to exit vi to run the script, which pissed me off, so I created
>a vi keyboard mapping:
>
>map! ^L ^[$Bma0"ld`a!!mha^M0"lP$a
I don't get it (because I have not actually like looked at the script) -
why did you have to exit vi to run the script? You seem to be running it
from inside vi using what I would expect (a !) in your mapping anyway.
Josh
--
josh blog: http://www.ellipsis.cx/~kortbein/blog/
_______________________________________________
hosers-talk mailing list
hosers-talk@xxxxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/hosers-talk