diff --git a/chezmoi/dot_config/complgen/lsof.usage.tmpl b/chezmoi/dot_config/complgen/lsof.usage.tmpl index 9043ed1..3264194 100644 --- a/chezmoi/dot_config/complgen/lsof.usage.tmpl +++ b/chezmoi/dot_config/complgen/lsof.usage.tmpl @@ -1,44 +1,55 @@ - | -U "option is also specified." - | -? "-h These two equivalent options select a usage (help) output list. Lsof displays a shortened form of this output when it detects an error in the options supplied to it," - | -a "causes list selection options to be ANDed, as described above." - | -A "A is available on systems configured for AFS whose AFS kernel code is implemented via dynamic modules. It allows the lsof user to specify A as an alternate name list" - | -b "causes lsof to avoid kernel functions that might block - lstat(2), readlink(2), and stat(2)." - | -c "c selects the listing of files for processes executing the command that begins with the characters of c. Multiple commands may be specified, using multiple -c options." - | -C "disables the reporting of any path name components from the kernel's name cache. See the KERNEL NAME CACHE section for more information." - | -d "s specifies a list of file descriptors (FDs) to exclude from or include in the output listing. The file descriptors are specified in the comma-separated set s - e.g.," - | -D "D directs lsof's use of the device cache file. The use of this option is sometimes restricted. See the DEVICE CACHE FILE section and the sections that follow it for" - | -D "must be followed by a function letter; the function letter may optionally be followed by a path name. Lsof recognizes these function letters:" - | -E "specifies that endpoint supported files should be displayed with endpoint information, but not the files of the endpoints." - | -F "f specifies a character list, f, that selects the fields to be output for processing by another program, and the character that terminates each output field. Each field" - | -g "[s] excludes or selects the listing of files for the processes whose optional process group IDentification (PGID) numbers are in the comma-separated set s - e.g., ``123''" - | -i "[i] selects the listing of files any of whose Internet address matches the address specified in i. If no address is specified, this option selects the listing of all In‐" - | -K "k selects the listing of tasks (threads) of processes, on dialects where task (thread) reporting is supported. (If help output - i.e., the output of the -h or -? op‐" - | -k "k specifies a kernel name list file, k, in place of /vmunix, /mach, etc. -k is not available under AIX on the IBM RISC/System 6000." - | -l "inhibits the conversion of user ID numbers to login names. It is also useful when login name lookup is working improperly or slowly." - | -n "inhibits the conversion of network numbers to host names for network files. Inhibiting conversion may make lsof run faster. It is also useful when host name lookup is" - | -N "selects the listing of NFS files." - | -o "directs lsof to display file offset at all times. It causes the SIZE/OFF output column title to be changed to OFFSET. Note: on some UNIX dialects lsof can't obtain" - | -o "o defines the number of decimal digits (o) to be printed after the ``0t'' for a file offset before the form is switched to ``0x...''. An o value of zero (unlimited) di‐" + | -? "-h These two equivalent options se‐" + | -a "causes list selection options to" + | -A "A is available on systems config‐" + | -b "causes lsof to avoid kernel" + | -c "c selects the listing of files for" + | -C "disables the reporting of any" + | -d "s specifies a list of file de‐" + | -D "D directs lsof's use of the device" + | -D "must be followed by a func‐" + | -E "specifies that endpoint sup‐" + | -f "are properly terminated and" + | -F "f specifies a character list, f," + | -g "[s] excludes or selects the listing" + | -i "[i] selects the listing of files any" + | -h "or -? (help) option. If the" + | -K "k selects the listing of tasks" + | -h "or -? options - shows this" + | -k "k specifies a kernel name list" + | -l "inhibits the conversion of user" + | -n "inhibits the conversion of net‐" + | -N "selects the listing of NFS" + | -o "directs lsof to display file" + | -o "o defines the number of decimal" | -o "-o 10" - | -O "directs lsof to bypass the strategy it uses to avoid being blocked by some kernel operations - i.e., doing them in forked child processes. See the BLOCKS AND TIMEOUTS" - | -p "s excludes or selects the listing of files for the processes whose optional process IDentification (PID) numbers are in the comma-separated set s - e.g., ``123'' or" - | -P "inhibits the conversion of port numbers to port names for network files. Inhibiting the conversion may make lsof run a little faster. It is also useful when port name" - | -Q "ignore failed search terms. When lsof is told to search for users of a file, or for users of a device, or for a specific PID, or for certain protocols in use by that" - | -R "directs lsof to list the Parent Process IDentification number in the PPID column." - | -s "[p:s] s alone directs lsof to display file size at all times. It causes the SIZE/OFF output column title to be changed to SIZE. If the file does not have a size, nothing is" - | -S "[t] specifies an optional time-out seconds value for kernel functions - lstat(2), readlink(2), and stat(2) - that might otherwise deadlock. The minimum for t is two; the" - | -T "[t] controls the reporting of some TCP/TPI information, also reported by netstat(1), following the network addresses. In normal output the information appears in parenthe‐" - | -T "with no following key characters disables TCP/TPI information reporting." - | -T "with following characters selects the reporting of specific TCP/TPI information:" - | -t "produce terse output comprising only process identifiers (without a header), so that it is easy to use programmatically. e.g." - | -u "s selects the listing of files for the user whose login names or user ID numbers are in the comma-separated set s - e.g., ``abe'', or ``548,root''. (There should be no" - | -U "selects the listing of UNIX domain socket files." - | -v "selects the listing of lsof version information, including: revision number; when the lsof binary was constructed; who constructed the binary and where; the name of the" - | -V "directs lsof to indicate the items it was asked to list and failed to find - command names, file names, Internet addresses or files, login names, NFS files, PIDs," - | -x "[fl] may accompany the +d and +D options to direct their processing to cross over symbolic links and|or file system mount points encountered when scanning the directory (+d)" - | -X "This is a dialect-specific option." - | -z "[z] specifies how Solaris 10 and higher zone information is to be handled." - | -Z "[Z] specifies how SELinux security contexts are to be handled. It and 'Z' field output character support are inhibited when SELinux is disabled in the running Linux ker‐" - | -- "The double minus sign option is a marker that signals the end of the keyed options. It may be used, for example, when the first file name begins with a minus sign. It" - | -T "option description or the description of the TCP/TPI field in OUTPUT FOR OTHER PROGRAMS for more information on state, queue size, and window size;" + | -O "directs lsof to bypass the" + | -p "s excludes or selects the listing" + | -P "inhibits the conversion of port" + | -Q "ignore failed search terms. When" + | -R "directs lsof to list the Parent" + | -s "[p:s] s alone directs lsof to display" + | -? "help output lists it." + | -S "[t] specifies an optional time-out" + | -T "[t] controls the reporting of some" + | -T "with no following key charac‐" + | -T "with following characters se‐" + | -h "or -? help output for the -T" + | -t "produce terse output comprising" + | -u "s selects the listing of files for" + | -U "selects the listing of UNIX do‐" + | -v "selects the listing of lsof ver‐" + | -V "directs lsof to indicate the" + | -h "or -? option. Disabling" + | -x "[fl] may accompany the +d and +D op‐" + | -X "This is a dialect-specific op‐" + | -z "[z] specifies how Solaris 10 and" + | -Z "[Z] specifies how SELinux security" + | -- "The double minus sign option is" + | -b "option, the only names you" + | -h "or -? option, gives the status of the" + | -m "options, lsof checks the user's au‐" + | -P "options; colon-separated" + | -- "'', and as many components" | -T "option will show what TCP/TPI reporting can be" + | -? "options to see if the +m and +m m op‐" + | -h "or -? option." diff --git a/devbox.json b/devbox.json index c00b8ff..fe9eb60 100644 --- a/devbox.json +++ b/devbox.json @@ -63,8 +63,24 @@ "init_hook": [ ". ${DEVBOX_GLOBAL_ROOT}/init.sh" ], - "scripts": { - "install-nnn": [ + "scripts": + "complgen-man": [ + "if [ -z \"$CMD\" ]; then", + " echo \"Usage: devbox run --env CMD= complgen-man\"", + " echo \"Generates completion template from man page for the specified command\"", + " exit 1", + "fi", + "man $CMD | complgen scrape > chezmoi/dot_config/complgen/$CMD.usage.tmpl" + ], + "complgen-help": [ + "if [ -z \"$CMD\" ]; then", + " echo \"Usage: devbox run --env CMD= complgen-help\"", + " echo \"Generates completion template from --help output for the specified command\"", + " exit 1", + "fi", + "$CMD --help | complgen scrape > chezmoi/dot_config/complgen/$CMD.usage.tmpl" + ], + "install-nnn": [ "sh -c \"$(curl -Ls https://raw.githubusercontent.com/jarun/nnn/master/plugins/getplugs)\"" ], "install-tmux": [