Print this page
12212 typos in some section 3tecla man pages
*** 58,68 ****
given filename prefix. By default all files in the list of directories
are targets for lookup and completion, but a versatile mechanism is
provided for only selecting specific types of files. The obvious
application of this facility is to provide Tab-completion and lookup of
executable commands in the UNIX PATH, so an optional callback which
! rejects all but executable files, is provided.
An Example
Under UNIX, the following example program looks up and displays the
full pathnames of each of the command names on the command line.
--- 58,68 ----
given filename prefix. By default all files in the list of directories
are targets for lookup and completion, but a versatile mechanism is
provided for only selecting specific types of files. The obvious
application of this facility is to provide Tab-completion and lookup of
executable commands in the UNIX PATH, so an optional callback which
! rejects all but executable files is provided.
An Example
Under UNIX, the following example program looks up and displays the
full pathnames of each of the command names on the command line.
*** 206,216 ****
function will be called with the full pathname of the file, plus any
application-specific data that you provide. If the callback returns 1
the filename will be reported as a match. If it returns 0, it will be
ignored. Suitable callback functions and their prototypes should be
declared with the following macro. The CplCheckFn typedef is also
! provided in case you wish to declare pointers to such functions
#define CPL_CHECK_FN(fn) int (fn)(void *data, const char *pathname)
typedef CPL_CHECK_FN(CplCheckFn);
--- 206,216 ----
function will be called with the full pathname of the file, plus any
application-specific data that you provide. If the callback returns 1
the filename will be reported as a match. If it returns 0, it will be
ignored. Suitable callback functions and their prototypes should be
declared with the following macro. The CplCheckFn typedef is also
! provided in case you wish to declare pointers to such functions.
#define CPL_CHECK_FN(fn) int (fn)(void *data, const char *pathname)
typedef CPL_CHECK_FN(CplCheckFn);
*** 244,254 ****
file is looked up, instead of calling the callback again, the cached
record of whether it was accepted or rejected is used. Thus if somebody
tries to complete an empty string, and hits tab a second time when
nothing appears to happen, there will only be one long delay, since the
second pass will operate entirely from the cached dispositions of the
! files. These cached dipositions are discarded whenever pca_scan_path()
is called, and whenever pca_set_check_fn() is called with changed
callback function or data arguments.
Error Handling
If pca_scan_path() reports that an error occurred by returning 1, you
--- 244,254 ----
file is looked up, instead of calling the callback again, the cached
record of whether it was accepted or rejected is used. Thus if somebody
tries to complete an empty string, and hits tab a second time when
nothing appears to happen, there will only be one long delay, since the
second pass will operate entirely from the cached dispositions of the
! files. These cached dispositions are discarded whenever pca_scan_path()
is called, and whenever pca_set_check_fn() is called with changed
callback function or data arguments.
Error Handling
If pca_scan_path() reports that an error occurred by returning 1, you
*** 285,290 ****
cpl_complete_word(3TECLA), ef_expand_file(3TECLA), gl_get_line(3TECLA),
libtecla(3LIB), attributes(5)
! August 13, 2007 PCA_LOOKUP_FILE(3TECLA)
--- 285,290 ----
cpl_complete_word(3TECLA), ef_expand_file(3TECLA), gl_get_line(3TECLA),
libtecla(3LIB), attributes(5)
! January 18, 2020 PCA_LOOKUP_FILE(3TECLA)