From 3e542bcd818c57785aa4cc7c5e6be3b92118fb7d Mon Sep 17 00:00:00 2001 From: Jun-ichi Takimoto Date: Fri, 22 Mar 2019 09:23:42 +0900 Subject: 44147: add/update completions for procps-ng New completions for free, pmap, slabtop, tload. Update _top. --- Completion/Linux/Command/_free | 25 +++++++++++++++++++++++++ Completion/Linux/Command/_pmap | 20 ++++++++++++++++++++ Completion/Linux/Command/_slabtop | 22 ++++++++++++++++++++++ Completion/Linux/Command/_tload | 9 +++++++++ 4 files changed, 76 insertions(+) create mode 100644 Completion/Linux/Command/_free create mode 100644 Completion/Linux/Command/_pmap create mode 100644 Completion/Linux/Command/_slabtop create mode 100644 Completion/Linux/Command/_tload (limited to 'Completion/Linux') diff --git a/Completion/Linux/Command/_free b/Completion/Linux/Command/_free new file mode 100644 index 000000000..cc5bcf3bd --- /dev/null +++ b/Completion/Linux/Command/_free @@ -0,0 +1,25 @@ +#compdef free +# based on procps-ng-3.3.15 + +_arguments -s \ + '(-l --lohi)'{-l,--lohi}'[show detailed low and high memory statistics]' \ + '(-t --total)'{-t,--total}'[show total for RAM + swap]' \ + '(-w --wide)'{-w,--wide}'[wide mode]' \ + '(-s --seconds)'{-s,--seconds}'[specify the delay between display]:seconds: ' \ + '(-c --count)'{-c+,--count=}'[specify the display count]:count: ' \ + '--si[use power of 1000 instead of power of 1024]' \ + '(-)--help[print help and exit]' \ + '(-)'{-V,--version}'[print version information and exit]' \ + + '(unit)' \ + {-b,--bytes}'[display the amount of memory in bytes]' \ + {-k,--kibi}'[display the amount of memory in kibibytes (default)]' \ + {-m,--mebi}'[display the amount of memory in mebibytes]' \ + {-g,--gibi}'[display the amount of memory in gibibytes]' \ + '--tebi[display the amount of memory in tebibytes]' \ + '--pebi[display the amount of memory in pebibytes]' \ + '(--si)--kilo[display the amount of memory in kilobytes]' \ + '(--si)--mega[display the amount of memory in megabytes]' \ + '(--si)--giga[display the amount of memory in gigabytes]' \ + '(--si)--tera[display the amount of memory in terabytes]' \ + '(--si)--peta[display the amount of memory in petabytes]' \ + {-h,--human}'[automatically select unit]' diff --git a/Completion/Linux/Command/_pmap b/Completion/Linux/Command/_pmap new file mode 100644 index 000000000..ba3321531 --- /dev/null +++ b/Completion/Linux/Command/_pmap @@ -0,0 +1,20 @@ +#compdef pmap +# based on procps-ng-3.3.15 + +_arguments -s \ + '(exit -A --range)'{-A+,--range}'[limit results to the specified address range]:low,high: ' \ + '(exit -q --quiet)'{-q,--quiet}'[do not display some header or footer lines]' \ + '(exit -p --show-path)'{-p,--show-path}'[show full path to files in the mapping column]' \ + '(exit)*: :_pids' \ + + '(format)' \ + '(exit)'{-d,--device}'[show the device format]' \ + '(exit)'{-x,--extended}'[show the extended format]' \ + '(exit)-X[show even more details than -x option]' \ + '(exit)-XX[show everything the kernel provides]' \ + '(exit)'{-c,--read-rc}'[read the default configuration]' \ + '(exit)'{-C+,--read-rc-from=}'[read the configuration from the specified file]: :_files' \ + + '(exit)' \ + '(- *)'{-n,--create-rc}'[create new default configuration and exit]' \ + '(- *)'{-N+,--create-rc-to=}'[create new configuration to the specified file and exit]: :_files' \ + '(- *)'{-h,--help}'[display help text and exit]' \ + '(- *)'{-V,--version}'[display version information and exit]' diff --git a/Completion/Linux/Command/_slabtop b/Completion/Linux/Command/_slabtop new file mode 100644 index 000000000..5c8919d12 --- /dev/null +++ b/Completion/Linux/Command/_slabtop @@ -0,0 +1,22 @@ +#compdef slabtop +# based on procps-ng-3.3.15 + +local -a criteria=( + 'a:number of active objects' + 'b:objects per slab' + 'c:cache size' + 'l:number of slabs' + 'v:number of active slabs' + 'n:name' + 'o:number of objects' + 'p:page per slab' + 's:object size' + 'u:cache utilization' +) + +_arguments -s \ + '(-d --delay -o --once)'{-d+,--delay=}'[specify the delay between updates]:seconds: ' \ + '(-s --sort)'{-s+,--sort=}'[specify the sort criteria]:criteria:(($criteria))' \ + '(-d --delay -o --once)'{-o,--once}'[display the output once and exit]' \ + '(-)'{-V,--version}'[display version information and exit]' \ + '(-)'{-h,--help}'[display usage information and exit]' diff --git a/Completion/Linux/Command/_tload b/Completion/Linux/Command/_tload new file mode 100644 index 000000000..29fddfc3d --- /dev/null +++ b/Completion/Linux/Command/_tload @@ -0,0 +1,9 @@ +#compdef tload +# based on procps-ng-3.3.15 + +_arguments -s \ + '(-s --scale)'{-s+,--scale=}'[specify the vertical scale]:number of characters between tics: ' \ + '(-d --delay)'{-d+,--delay=}'[specify the delay between updates]:seconds: ' \ + '(- *)'{-h,--help}'[display help and exit]' \ + '(- *)'{-V,--version}'[display version information and exit]' \ + '1: :_ttys -o' -- cgit 1.4.1