EDITOR

| | Comments (0)
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;

use.perl.org

Leave a comment

<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Entry

This page contains a single entry by pudge published on August 27, 2003 8:03 PM.

An Open Letter to Eric S. Raymond was the previous entry in this site.

Mac-Glue-1.12 Released is the next entry in this site.

Find recent content on the main index or look in the archives to find all content.