This commit is contained in:
Adrian Sampson 2015-08-14 19:44:11 -07:00
parent 217a8126bc
commit 7b6c773a3f
3 changed files with 10 additions and 7 deletions

View file

@ -736,11 +736,14 @@ def open_anything():
def interactive_open(target, command=None):
"""Open `target` file with `command` or, in not available, ask the OS to
deal with it.
"""Open the file `target` by `exec`ing a new command. (The new
program takes over, and Python execution ends: this does not fork a
subprocess.)
The executed program will have stdin, stdout and stderr.
OSError may be raised, it is left to the caller to catch them.
If `command` is provided, use it. Otherwise, use an OS-specific
command (from `open_anything`) to open the file.
Can raise `OSError`.
"""
if command:
command = command.encode('utf8')

View file

@ -8,8 +8,8 @@ The new features:
* Add new color aliases for standard terminal color names (e.g., cyan and
magenta). Thanks to :user:`mathstuf`. :bug:`1548`
* :doc:`/plugins/play`: A new option `--args`/`-A` has been added, used to
hand over options to the player.
* :doc:`/plugins/play`: A new ``--args`` option lets you specify options for
the player command. :bug:`1532`
Fixes: