Friday, January 3, 2020

how do I determine the status of a process within a terminal tab?

The ":ls" command in Vim output the current buffers in Vim. If one of the buffers is a terminal, there are some useful flags to examine there. For example, if the command was

:term echo "test"

:ls will contain an entry similar to:

 7 %aF "!echo "test" [finished]" line 1

Question: is there a vimscript function that could return such extended information about a buffer? :help terminal suggests that if modifiable option is off, the job had to have finished. Namely,

before changes can be made to a terminal buffer, the 'modifiable' option must be set. This is only possible when the job has finished:

So, is examining the modifiable option the best way to determine if a shell process has finished? What if I wanted to examine the exis status?

--
--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/vim_use/0f6bca70-40b8-46c3-953d-dd081fc6f782%40googlegroups.com.

No comments: