Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #17831

Re: Idiom for shelling out to $EDITOR/$PAGER?

From Owen Jacobson <angrybaldguy@gmail.com>
Newsgroups comp.lang.python
Message-ID <2011122321410754142-angrybaldguy@gmailcom> (permalink)
References <mailman.4014.1324613800.27778.python-list@python.org> <mailman.4017.1324620143.27778.python-list@python.org>
Subject Re: Idiom for shelling out to $EDITOR/$PAGER?
Date 2011-12-23 21:41 -0500

Show all headers | View raw


On 2011-12-23 06:02:18 +0000, Cameron Simpson said:

> MacOSX has "open", though it won't be running a blocking editor, alas.

But it can be. From the man page:

     -t  Causes the file to be opened with the default text editor, as deter-
         mined via LaunchServices

and

     -W  Causes open to wait until the applications it opens (or that were
         already open) have exited.  Use with the -n flag to allow open to
         function as an appropriate app for the $EDITOR environment variable.

and finally

     -n  Open a new instance of the application(s) even if one is already run-
         ning.

can be combined to make 'open' (the shell interface to OS X's 
LaunchServices system) into a workable $EDITOR.

-o

Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: Idiom for shelling out to $EDITOR/$PAGER? Cameron Simpson <cs@zip.com.au> - 2011-12-23 17:02 +1100
  Re: Idiom for shelling out to $EDITOR/$PAGER? Ben Finney <ben+python@benfinney.id.au> - 2011-12-23 17:12 +1100
    Re: Idiom for shelling out to $EDITOR/$PAGER? Cameron Simpson <cs@zip.com.au> - 2011-12-23 17:32 +1100
      Re: Idiom for shelling out to $EDITOR/$PAGER? Ben Finney <ben+python@benfinney.id.au> - 2011-12-23 23:06 +1100
        Re: Idiom for shelling out to $EDITOR/$PAGER? Tim Chase <python.list@tim.thechases.com> - 2011-12-23 06:28 -0600
  Re: Idiom for shelling out to $EDITOR/$PAGER? Owen Jacobson <angrybaldguy@gmail.com> - 2011-12-23 21:41 -0500

csiph-web