Mercurial > vim
diff runtime/doc/eval.txt @ 11933:d033653d3df8 v8.0.0846
patch 8.0.0846: cannot get the name of the pty of a job
commit https://github.com/vim/vim/commit/7c9aec4ac86ccc455c0859d9393253141e3f77b6
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Aug 3 13:51:25 2017 +0200
patch 8.0.0846: cannot get the name of the pty of a job
Problem: Cannot get the name of the pty of a job.
Solution: Add the "tty" entry to the job info. (Ozaki Kiichi, closes https://github.com/vim/vim/issues/1920)
Add the term_gettty() function.
author | Christian Brabandt <cb@256bit.org> |
---|---|
date | Thu, 03 Aug 2017 14:00:06 +0200 |
parents | 40322e8f07e7 |
children | 12833414cc02 |
line wrap: on
line diff
--- a/runtime/doc/eval.txt +++ b/runtime/doc/eval.txt @@ -1,4 +1,4 @@ -*eval.txt* For Vim version 8.0. Last change: 2017 Aug 01 +*eval.txt* For Vim version 8.0. Last change: 2017 Aug 03 VIM REFERENCE MANUAL by Bram Moolenaar @@ -2376,6 +2376,7 @@ term_getline({buf}, {row}) String get a term_getsize({buf}) List get the size of a terminal term_getstatus({buf}) String get the status of a terminal term_gettitle({buf}) String get the title of a terminal +term_gettty({buf}) String get the tty name of a terminal term_list() List get the list of terminal buffers term_scrape({buf}, {row}) List get row of a terminal screen term_sendkeys({buf}, {keys}) none send keystrokes to a terminal @@ -5192,6 +5193,8 @@ job_info({job}) *job_info()* Returns a Dictionary with information about {job}: "status" what |job_status()| returns "channel" what |job_getchannel()| returns + "process" process ID + "tty" controlling terminal name, empty when none "exitval" only valid when "status" is "dead" "exit_cb" function to be called on exit "stoponexit" |job-stoponexit| @@ -7930,6 +7933,7 @@ term_getcursor({buf}) *term_getcurso term_getjob({buf}) *term_getjob()* Get the Job associated with terminal window {buf}. {buf} is used as with |term_getsize()|. + Returns |v:null| when there is no job. term_getline({buf}, {row}) *term_getline()* Get a line of text from the terminal window of {buf}. @@ -7943,9 +7947,9 @@ term_getsize({buf}) *term_getsize()* numbers: [rows, cols]. This is the size of the terminal, not the window containing the terminal. - {buf} must be the buffer number of a terminal window. If the - buffer does not exist or is not a terminal window, an empty - list is returned. + {buf} must be the buffer number of a terminal window. Use an + empty string for the current buffer. If the buffer does not + exist or is not a terminal window, an empty list is returned. term_getstatus({buf}) *term_getstatus()* Get the status of terminal {buf}. This returns a comma @@ -7967,6 +7971,11 @@ term_gettitle({buf}) *term_gettitle( buffer does not exist or is not a terminal window, an empty string is returned. +term_gettty({buf}) *term_gettty()* + Get the name of the controlling terminal associated with + terminal window {buf}. + {buf} is used as with |term_getsize()|. + term_list() *term_list()* Return a list with the buffer numbers of all buffers for terminal windows. @@ -7982,7 +7991,7 @@ term_scrape({buf}, {row}) *term_scrap "chars" character(s) at the cell "fg" foreground color as #rrggbb "bg" background color as #rrggbb - "attr" attributes of the cell, use term_getattr() + "attr" attributes of the cell, use |term_getattr()| to get the individual flags "width" cell width: 1 or 2