EDITOR
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":
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;
Leave a comment