Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

pudge (1)

pudge
  (email not shown publicly)
http://pudge.net/
AOL IM: Crimethnk (Add Buddy, Send Message)

I run this joint, see?

Journal of pudge (1)

Wednesday August 27, 2003
10:03 PM

EDITOR

[ #14358 ]

I use BBEdit as my editor, and in the command line, like to use the "bbedit" command-line tool, which opens a file with BBEdit. So I set my EDITOR var in the environment to "bbedit".

But this doesn't work when the program calling EDITOR needs to wait for the file to be done (such as in cvs commit). So there is a "-w" option that means "wait," so the command-line tool does not return until the window is closed. Coolio, so I set EDITOR to "bbedit -w".

Except that some programs (like with crontab -e) like to be smart and check to see if EDITOR is executable, and there is no executable named "bbedit -w". So I wrote a really complex program to set as my EDITOR, called "bbeditw":

#!/usr/bin/perl
system "bbedit", "-w", @ARGV;

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.