[Greasemonkey] unix users: is there an easy, cross-platform way to get the default editor?

Aaron Boodman zboogs at gmail.com
Sat Apr 16 14:59:33 EDT 2005


Actually, I don't know if what I just said made any sense, but thanks
again for the hint.

On 4/16/05, Aaron Boodman <zboogs at gmail.com> wrote:
> Oh yeah, I didn't think of the fact that GM could just pick one shell
> or the other to run the command in.
> 
> *slaps forehead*
> 
> thanks.
> 
> On 4/16/05, Justin Mason <jm at jmason.org> wrote:
> > -----BEGIN PGP SIGNED MESSAGE-----
> > Hash: SHA1
> >
> >
> > Aaron Boodman writes:
> > > It seems to vary depending on the shell you use. And I'm not enough of
> > > a unix user to know if it varies additionally depending on the distro
> > > you use.
> >
> > the environment variable $EDITOR is the standard way to get this.
> > if that's unset, it's acceptable to default to vi or emacs.
> > If you can run a /bin/sh shell command, this'll work:
> >
> >   ${EDITOR:-vi} $file
> >
> > - --j.
> > -----BEGIN PGP SIGNATURE-----
> > Version: GnuPG v1.2.5 (GNU/Linux)
> > Comment: Exmh CVS
> >
> > iD8DBQFCYXpLMJF5cimLx9ARAuKYAJoC3VDqr4plx1UrmL8/vsI4o+O64gCfZEhj
> > uPsi+fCozjxCWPly9EGG2iM=
> > =V0Yl
> > -----END PGP SIGNATURE-----
> >
> > _______________________________________________
> > Greasemonkey mailing list
> > Greasemonkey at mozdev.org
> > http://mozdev.org/mailman/listinfo/greasemonkey
> >
>


More information about the Greasemonkey mailing list