Go to file
James McCoy 419695dd0f Run tty in a shell that has stdin attached to a tty
Using system('tty') will always report "not a tty", since the spawned shell
has stdin redirected.  In order to get an accurate value for $GPG_TTY when
it's not already set, read the output of the tty command using :!.

This requires a bit more setup/teardown to ensure the buffer and user's undo
state aren't affected, but it's the only way to accurately determine the
user's tty.

Closes: #1
Signed-off-by: James McCoy <vega.james@gmail.com>
2012-10-28 22:53:07 -04:00
plugin Run tty in a shell that has stdin attached to a tty 2012-10-28 22:53:07 -04:00