Avoiding repeating myself (on the command line)

Oct 27, 2009 21:37


I was working on some automated document generation, building the process, revising the input document, and checking the results, and got tired enough of typing "make output/foo.txt && open output/foo.txt" and then going back and editing that line when I wanted to check the PDF version etc. that I wrote a tool which I hope will have more general ( Read more... )

programming, programs, haskell, shell

Leave a comment

Comments 2

dougo October 28 2009, 04:57:19 UTC
You could also add "open" targets to the Makefile.

Reply

kpreid October 28 2009, 11:46:53 UTC

Hm, I could. I had rejected that solution because I figured I'd need a target for each output type, but that's not true, is it (untested):

open-%: %
open "$^"

On the other hand, this command works in any project, not just this one.

Reply


Leave a comment

Up