Tuesday, June 5, 2018

Re: Bash in :shell vs :terminal

On Mon, 04 Jun 2018, Jason Franklin wrote:

> ... I'm fine with a VIM_TERMINAL variable so long as it allows me to distinguish when a terminal window is in use.

I think, it boils down to one kind of typical situation,
and an otherwise never reliably solvable problem.

If you only need to know, which way the 'currently starting'
program runs under 'vim', you can use any 'switch', which
is inherited by the child program.

BUT if the programs running 'under vim' itself forks off
decendants, you sooner or later will be lost, if/because
the 'switch' is passed on to the children, and they can
somehow loose/change/reset their association to the
terminal (like starting a terminalprogram themselves),
while the inherited 'switch' still stays the same.

Namespacing may work, because you fix the atribute to
the pty, and any decendant then can find out, whether
it is on such a terminal, but I fear it only works
on linux, and I don't now whether you'd need root.

Stucki

--
Christoph von Stuckrad * * | also XMPP = |Mail <stucki@mi.fu-berlin.de> \
Freie Universitaet Berlin |/_*| 'jabber' via|Tel(Mo.,Mi.):+49 30 838-75 459|
IT Mathematik & Informatik|\ *|stucki@jabber| (Di,Do,Fr):+49 30 77 39 6600|
Takustr. 9 / 14195 Berlin * * |.fu-berlin.de|Fax(home): +49 30 77 39 6601/


--
--
You received this message from the "vim_use" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups "vim_use" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vim_use+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment