comparison 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
comparison
equal deleted inserted replaced
11932:6dd3262cbf09 11933:d033653d3df8
1 *eval.txt* For Vim version 8.0. Last change: 2017 Aug 01 1 *eval.txt* For Vim version 8.0. Last change: 2017 Aug 03
2 2
3 3
4 VIM REFERENCE MANUAL by Bram Moolenaar 4 VIM REFERENCE MANUAL by Bram Moolenaar
5 5
6 6
2374 term_getjob({buf}) Job get the job associated with a terminal 2374 term_getjob({buf}) Job get the job associated with a terminal
2375 term_getline({buf}, {row}) String get a line of text from a terminal 2375 term_getline({buf}, {row}) String get a line of text from a terminal
2376 term_getsize({buf}) List get the size of a terminal 2376 term_getsize({buf}) List get the size of a terminal
2377 term_getstatus({buf}) String get the status of a terminal 2377 term_getstatus({buf}) String get the status of a terminal
2378 term_gettitle({buf}) String get the title of a terminal 2378 term_gettitle({buf}) String get the title of a terminal
2379 term_gettty({buf}) String get the tty name of a terminal
2379 term_list() List get the list of terminal buffers 2380 term_list() List get the list of terminal buffers
2380 term_scrape({buf}, {row}) List get row of a terminal screen 2381 term_scrape({buf}, {row}) List get row of a terminal screen
2381 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal 2382 term_sendkeys({buf}, {keys}) none send keystrokes to a terminal
2382 term_start({cmd}, {options}) Job open a terminal window and run a job 2383 term_start({cmd}, {options}) Job open a terminal window and run a job
2383 term_wait({buf}) Number wait for screen to be updated 2384 term_wait({buf}) Number wait for screen to be updated
5190 5191
5191 job_info({job}) *job_info()* 5192 job_info({job}) *job_info()*
5192 Returns a Dictionary with information about {job}: 5193 Returns a Dictionary with information about {job}:
5193 "status" what |job_status()| returns 5194 "status" what |job_status()| returns
5194 "channel" what |job_getchannel()| returns 5195 "channel" what |job_getchannel()| returns
5196 "process" process ID
5197 "tty" controlling terminal name, empty when none
5195 "exitval" only valid when "status" is "dead" 5198 "exitval" only valid when "status" is "dead"
5196 "exit_cb" function to be called on exit 5199 "exit_cb" function to be called on exit
5197 "stoponexit" |job-stoponexit| 5200 "stoponexit" |job-stoponexit|
5198 5201
5199 job_setoptions({job}, {options}) *job_setoptions()* 5202 job_setoptions({job}, {options}) *job_setoptions()*
7928 list is returned. 7931 list is returned.
7929 7932
7930 term_getjob({buf}) *term_getjob()* 7933 term_getjob({buf}) *term_getjob()*
7931 Get the Job associated with terminal window {buf}. 7934 Get the Job associated with terminal window {buf}.
7932 {buf} is used as with |term_getsize()|. 7935 {buf} is used as with |term_getsize()|.
7936 Returns |v:null| when there is no job.
7933 7937
7934 term_getline({buf}, {row}) *term_getline()* 7938 term_getline({buf}, {row}) *term_getline()*
7935 Get a line of text from the terminal window of {buf}. 7939 Get a line of text from the terminal window of {buf}.
7936 {buf} is used as with |term_getsize()|. 7940 {buf} is used as with |term_getsize()|.
7937 7941
7941 term_getsize({buf}) *term_getsize()* 7945 term_getsize({buf}) *term_getsize()*
7942 Get the size of terminal {buf}. Returns a list with two 7946 Get the size of terminal {buf}. Returns a list with two
7943 numbers: [rows, cols]. This is the size of the terminal, not 7947 numbers: [rows, cols]. This is the size of the terminal, not
7944 the window containing the terminal. 7948 the window containing the terminal.
7945 7949
7946 {buf} must be the buffer number of a terminal window. If the 7950 {buf} must be the buffer number of a terminal window. Use an
7947 buffer does not exist or is not a terminal window, an empty 7951 empty string for the current buffer. If the buffer does not
7948 list is returned. 7952 exist or is not a terminal window, an empty list is returned.
7949 7953
7950 term_getstatus({buf}) *term_getstatus()* 7954 term_getstatus({buf}) *term_getstatus()*
7951 Get the status of terminal {buf}. This returns a comma 7955 Get the status of terminal {buf}. This returns a comma
7952 separated list of these items: 7956 separated list of these items:
7953 running job is running 7957 running job is running
7965 7969
7966 {buf} must be the buffer number of a terminal window. If the 7970 {buf} must be the buffer number of a terminal window. If the
7967 buffer does not exist or is not a terminal window, an empty 7971 buffer does not exist or is not a terminal window, an empty
7968 string is returned. 7972 string is returned.
7969 7973
7974 term_gettty({buf}) *term_gettty()*
7975 Get the name of the controlling terminal associated with
7976 terminal window {buf}.
7977 {buf} is used as with |term_getsize()|.
7978
7970 term_list() *term_list()* 7979 term_list() *term_list()*
7971 Return a list with the buffer numbers of all buffers for 7980 Return a list with the buffer numbers of all buffers for
7972 terminal windows. 7981 terminal windows.
7973 7982
7974 term_scrape({buf}, {row}) *term_scrape()* 7983 term_scrape({buf}, {row}) *term_scrape()*
7980 7989
7981 Return a List containing a Dict for each screen cell: 7990 Return a List containing a Dict for each screen cell:
7982 "chars" character(s) at the cell 7991 "chars" character(s) at the cell
7983 "fg" foreground color as #rrggbb 7992 "fg" foreground color as #rrggbb
7984 "bg" background color as #rrggbb 7993 "bg" background color as #rrggbb
7985 "attr" attributes of the cell, use term_getattr() 7994 "attr" attributes of the cell, use |term_getattr()|
7986 to get the individual flags 7995 to get the individual flags
7987 "width" cell width: 1 or 2 7996 "width" cell width: 1 or 2
7988 7997
7989 term_sendkeys({buf}, {keys}) *term_sendkeys()* 7998 term_sendkeys({buf}, {keys}) *term_sendkeys()*
7990 Send keystrokes {keys} to terminal {buf}. 7999 Send keystrokes {keys} to terminal {buf}.