Compare commits

...

8 Commits

Author SHA1 Message Date
Shohei YOSHIDA 73b5b78d70
Update blkid 2025-08-05 12:14:58 +09:00
Shohei YOSHIDA 50611e5b99
Update chmem 2025-08-05 12:01:27 +09:00
Shohei YOSHIDA 3ef170ff4f
Update fallocate 2025-08-05 11:56:29 +09:00
Shohei YOSHIDA dee6427296
Update ipcrm 2025-08-05 11:43:19 +09:00
Shohei YOSHIDA f21d28a4a1
Update ipcmk 2025-08-05 11:36:07 +09:00
Shohei YOSHIDA 420a3d78c9
Update ipcs 2025-08-05 11:30:57 +09:00
Shohei YOSHIDA 0032bac859
Update ldattach 2025-08-05 09:35:33 +09:00
Shohei YOSHIDA bdee8a976c
Update mcookie 2025-08-05 09:04:53 +09:00
8 changed files with 113 additions and 85 deletions

View File

@ -27,7 +27,8 @@
# Description # Description
# ----------- # -----------
# #
# Completion for blkid (locate/print block device attributes) from util-linux # Completion for blkid, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - locate/print block device attributes
# https://man7.org/linux/man-pages/man8/blkid.8.html # https://man7.org/linux/man-pages/man8/blkid.8.html
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -36,18 +37,26 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments \ _arguments \
'(-h --help)'{-h,--help}'[display help message and exit]' \ '(-c --cache-file)'{-c+,--cache-file}'[Read from cachefile instead of reading from the default cache file]:cache file:_files' \
'(-V --version)'{-V,--version}'[display version information and exit]' \ '(-d --no-encoding)'{-d,--no-encoding}"[Don't encode non-printing characters]" \
'(-c --cache)'{-c+,--cache=}'[specify cache file]:cache file:_files' \ '(-D --no-part-details)'{-D,--no-part-details}"[Don't print information from partition table in low-level probing mode]" \
'(-o --output)'{-o+,--output=}'[specify output format]:format:(full value device export udev)' \ '(-g --garbage-collect)'{-g,--garbage-collect}'[Perform a garbage collection on the blkid cache]' \
'--output-uuid[print only UUIDs]' \ '(-H --hint)'{-H,--hint}'[Set probing hint]:setting' \
'--output-label[print only labels]' \ '(-i --info)'{-i,--info}'[Display information about I/O limits]' \
'--match-token=[search for devices with specific tokens]:token (e.g. UUID= or LABEL=)' \ '(-k --list-filesystems)'{-k,--list-filesystems}'[List all known filesystems and RAIDS and exits]' \
'--match-tag=[search for devices with a tag name]:tag name' \ '(-l --list-one)'{-l,--list-one}'[Look up only one device that matches with the --match-token option]' \
'--probe[use low-level probing on devices]' \ '(-L --label)'{-L+,--label}'[Look up the device that uses this filesystem label]:label' \
'--match-types=[limit probing to specific filesystem types]:filesystem types' \ '(-n --match-types)'{-n+,--match-types}'[Restrict the probing functions to the specified comma-separated list of superblock types]:list' \
'(-d --no-encoding)'{-d,--no-encoding}'[do not encode non-printable characters]' \ '(-o --output)'{-o+,--output}'[Use the specified output format]:format:(full value list device udev export)' \
'--list-one[print only the first device found]' \ '(-O --offset)'{-O+,--offset}'[Probe at the given offset]:offset' \
'(-p --probe)'{-p,--probe}'[Switch to low-level superblock probing mode]' \
'(-s --match-tag)'{-m+,--match-tag}'[Show only the tags that match tag]:tag' \
'(-S --size)'{-S,--size}'[Override the size of device/file]' \
'(-t --match-token)'{-t+,--match-token}'[Search for block devices with tokens named NAME that have the VALUE]:name' \
'(-u --usages)'{-u,--usages}'[Restrict the probing functions to the specified comma-separated list of usage types]:list' \
'(-U --uuid)'{-U,--uuid}'[Look up the device that uses this filesystem uuid]:uuid' \
'(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]' \
'*:device:_files -g /dev' '*:device:_files -g /dev'
# Local Variables: # Local Variables:

View File

@ -28,19 +28,21 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for chmem - configure memory # Completion script for chmem, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - configure memory
# #
# Author: # Author:
# *Aditi Sharma (https://github.com/Aditi76117) # *Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ _arguments -s \
'--enable[Enable memory section]:memory section (e.g., 0x1234)' \ '(-b --blocks)'{-b,--blocks}'[Use a BLOCKRANGE parameter instead of RANGE or SIZE]' \
'--disable[Disable memory section]:memory section (e.g., 0x1234)' \ '(-d --disable)'{-d,--disable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory offline]' \
'--blocks[Specify blocks instead of section numbers]' \ '(-e --enable)'{-e,--enable}'[Set the specified RANGE, SIZE, or BLOCKRANGE of memory online]' \
'--verbose[Enable verbose mode]' \ '(-z --zone)'{-z,--zone}'[Select the memory ZONE where to set the specified RANGE, SIZE, or BLOCKRANGE of memory online or offline]' \
'--help[Display help message and exit]' \ '(-v --verbose)'{-v,--verbose}'[Verbose mode]' \
'--version[Display version information and exit]' '(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -28,7 +28,8 @@
# Description # Description
# ----------- # -----------
# #
# Completion for fallocate (preallocate space to a file) from util-linux # Completion for fallocate, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - preallocate or deallocate space to a file
# https://man7.org/linux/man-pages/man1/fallocate.1.html # https://man7.org/linux/man-pages/man1/fallocate.1.html
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
# Authors # Authors
@ -37,16 +38,18 @@
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments \ _arguments \
'(-h --help)'{-h,--help}'[display help message and exit]' \ '(-c --collapse-range)'{-c,--collapse-range}'[Removes a byte range from a file without leaving a hole]' \
'(-V --version)'{-V,--version}'[display version information and exit]' \ '(-d --dig-holes)'{-d,--dig-holes}'[Detect and dig holes]' \
'(-l --length)'{-l+,--length=}'[specify length of the allocation]:length (e.g. 1G, 512M)' \ '(-i --insert-range)'{-i,--insert-range}'[Insert a hole of length bytes from offset]' \
'(-o --offset)'{-o+,--offset=}'[start offset for allocation]:offset (e.g. 0, 1K)' \ '(-l --length)'{-l+,--length}'[Specifies the length of the range, in bytes]:bytes' \
'--dig-holes[detect and punch holes in the range]' \ '(-n --keep-size)'{-n,--keep-size}'[Do not modify the apparent length of the file]' \
'--punch-hole[punch holes (deallocate space)]' \ '(-o --offset)'{-o+,--offset}'[Specifies the beginning offset of the range, in bytes]:offset' \
'--collapse-range[remove a range of bytes and move later bytes forward]' \ '(-p --punch-hole)'{-p,--punch-hole}'[Deallocates space in the byte range starting at offset and continuing for length bytes]' \
'--zero-range[zero and optionally deallocate space]' \ '(-v --verbose)'{-v,--verbose}'[Enable verbose mode]' \
'--keep-size[do not extend file size beyond current size]' \ '(-x --posix)'{-p,--posix}'[Enable POSIX operation mode]' \
'--insert-range[insert space into file shifting existing data]' \ '(-z --zero-range)'{-z,--zero-range}'[Zeroes space in the byte range starting at offset and continuing for length bytes]' \
'(- *)'{-h,--help}'[Display help text and exit]' \
'(- *)'{-V,--version}'[Print version and exit]' \
'*:filename:_files' '*:filename:_files'
# Local Variables: # Local Variables:

View File

@ -28,20 +28,20 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for ipcmk - create various IPC resources # Completion script for ipcmk, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - create various IPC resources
# #
# Author: # Author:
# * Aditi Sharma (https://github.com/Aditi76117) # * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ _arguments -s \
'--shmem[Create a shared memory segment]' \ '(-M --shmem)'{-M,--shmem}'[Create a shared memory segment of size bytes]:size' \
'--queue[Create a message queue]' \ '(-Q --queue)'{-Q,--queue}'[Create a message queue]' \
'--semaphore[Create a semaphore array]' \ '(-S --semaphore)'{-S,--semaphore}'[Create a semaphore array with number of elements]:number' \
'--size[Size of shared memory segment (in bytes)]:size (bytes): ' \ '(-p --mode)'{-p,--mode}'[Access permissions for the resource]:mode' \
'--mode[Permissions for the resource (octal)]:permissions (e.g. 0600): ' \ '(- *)'{-h,--help}'[Display help text and exit]' \
'--help[Display help message and exit]' \ '(- *)'{-V,--version}'[Print version and exit]'
'--version[Display version information and exit]'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script
@ -53,4 +53,3 @@ _arguments -s \
# Note: This script is useful only on systems with `ipcmk` (typically Linux). # Note: This script is useful only on systems with `ipcmk` (typically Linux).
# macOS does not include this command. # macOS does not include this command.

View File

@ -28,25 +28,25 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for ipcrm - remove System V IPC objects # Completion script for ipcrm, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - remove System V IPC objects
# #
# Author: # Author:
# * Aditi Sharma (https://github.com/Aditi76117) # * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ _arguments -s \
'--all[Remove all resources of specified type]' \ '(-a --all)'{-a,--all}'-[Remove all resources]:resource:(shm msg sem)' \
'--all=msg[Remove all message queues]' \ '(-M --shmem-key)'{-M,--shmem-key}'[Remove the shared memory segment created with shemkey]:shmkey' \
'--all=shm[Remove all shared memory segments]' \ '(-m --shmem-id)'{-m,--shmem-id}'[Remove the shared memory segment identified by shmid]:shmid' \
'--all=sem[Remove all semaphores]' \ '(-Q --queue-key)'{-Q,--queue-key}'[Remove the message queue created with msgkey]:msgkey' \
'--msgid[Remove message queue by id]:msgid: ' \ '(-q --queue-id)'{-q,--queue-id}'[Remove the message queue identified by msgid]:msgid' \
'--shmid[Remove shared memory segment by id]:shmid: ' \ '(-S --semaphore-key)'{-S,--semaphore-key}'[Remove the semaphore created with semkey]:semkey' \
'--semid[Remove semaphore by id]:semid: ' \ '(-s --semaphore-id)'{-s,--semaphore-id}'[Remove the semaphore identified by semid]' \
'--msgkey[Remove message queue by key]:msgkey: ' \ '(- *)'{-h,--help}'[Display help text and exit]' \
'--shmkey[Remove shared memory segment by key]:shmkey: ' \ '(- *)'{-V,--version}'[Print version and exit]' \
'--semkey[Remove semaphore by key]:semkey: ' \ '1:type:(shm msg sem)' \
'--help[Display help message and exit]' \ '*:id'
'--version[Display version information and exit]'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -28,25 +28,28 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for ipcs - show information on IPC facilities # Completion script for ipcs, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - show information on IPC facilities
# #
# Author: # Author:
# * Aditi Sharma (https://github.com/Aditi76117) # * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ _arguments -s \
'-m[List shared memory segments]' \ '(-i --id)'{-i,--id}'[Show full details on just one resource element identified by id]:id' \
'-q[List message queues]' \ '(- *)'{-h,--help}'[Display help text and exit]' \
'-s[List semaphore arrays]' \ '(- *)'{-V,--version}'[Print version and exit]' \
'-a[List all facilities]' \ '(-m --shmems)'{-m,--shmems}'[Write information about active shared memory segments]' \
'-c[Show creator and owner]' \ '(-q --queues)'{-q,--queues}'[Write information about active message queues]' \
'-l[Show limits]' \ '(-s --semaphores)'{-s,--semaphores}'[Write information about active semaphore sets]' \
'-p[Show PIDs]' \ '(-a --all -s --semaphores -q --queues -m --shmems)'{-a,--all}'[Write information about all three resources]' \
'-t[Show times]' \ '(-c --creator)'{-c,--creator}'[Show creator and owner]' \
'-u[Show summary]' \ '(-l --limits)'{-l,--limits}'[Show resource limits]' \
'--human[Print sizes in human-readable format]' \ '(-p --pid)'{-p,--pid}'[Show PIDs of creator and last operator]' \
'--help[Display help message and exit]' \ '(-t --time)'{-t,--time}'[Write time information]' \
'--version[Display version information and exit]' '(-u --summary)'{-u,--summary}'[Show status summary]' \
'(--human -b --bytes)'{-b,--bytes}'[Print the sizes in bytes rather than in a human-readable format]' \
'(--human -b --bytes)--human[Print sizes in human-readable format]'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script

View File

@ -28,24 +28,34 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for ldattach - attach a line discipline to a serial line # Completion script for ldattach, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - attach a line discipline to a serial line
# #
# Author: # Author:
# * Aditi Sharma (https://github.com/Aditi76117) # * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ typeset -A opt_args
'--debug[Enable debugging output]' \ local context state line
'--eightbits[Use 8-bit characters]' \
'--evenparity[Use even parity]' \ local curcontext="$curcontext"
'--oddparity[Use odd parity]' \
'--noparity[Use no parity]' \ _arguments -s -C \
'--nohangup[Do not hang up on close]' \ '(-1,--onestopbit)'{-1,--onestopbit}'[Set the number of stop bits of the serial line to one]' \
'--speed[Specify baud rate]:baud rate (e.g., 9600)' \ '(-2,--twostopbits)'{-2,--twostopbits}'[Set the number of stop bits of the serial line to two]' \
'--wait-slave[Wait for slave device to appear]' \ '(-7,--sevenbits)'{-7,--sevenbits}'[Set the character size of the srial line to 7 bits]' \
'--help[Display help message and exit]' \ '(-8,--eightbits)'{-8,--eightbits}'[Set the character size of the srial line to 8 bits]' \
'--version[Display version information and exit]' \ '(-d --debug)'{-d,--debug}'[Enable debugging output]' \
'*::device:->device' '(-e --evenparity)'{-e,--evenparity}'[Set the parity of the serial line to even]' \
'(-i --iflag)'{-i,--iflag}'[Set the specified bits in the c_iflag word of the serial line]:value' \
'(-n --noparity)'{-n,--noparity}'[Set the parity of the serial line to none]' \
'(-o --oddparity)'{-o,--oddparity}'[Set the parity of the serial line to odd]' \
'(-s --speed)'{-s,--speed}'[Set the speed(the baud rate) of the serial line]:value' \
'(-C --intro-command)'{-C,--intro-command}'[An intro command before the invocation of ldattach]:command' \
'(-p --pause)'{-p,--pause}'[Sleep for given seconds before the invocation of ldattach]:value' \
'(- *)'{-h,--help}'[Display help text and exit]'\
'(- *)'{-V,--version}'[Print version and exit]' \
'2::device:->device'
# Complete device argument # Complete device argument
case $state in case $state in

View File

@ -28,17 +28,19 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for mcookie - generate random 128-bit hexadecimal numbers # Completion script for mcookie, util-linux 2.40.2 (https://github.com/util-linux/util-linux/)
# - generate random 128-bit hexadecimal numbers
# #
# Author: # Author:
# * Aditi Sharma (https://github.com/Aditi76117) # * Aditi Sharma (https://github.com/Aditi76117)
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
_arguments -s \ _arguments \
'--max-size[Set maximum length of output]:number' \ {-f,--file}'[Use file as as cookie seed]:file:_files' \
'--verbose[Print entropy source and random seed info]' \ {-m,--max-size}'[Set maximum length of output]:number' \
'--help[Display help message and exit]' \ {-v,--verbose}'[Print entropy source and random seed info]' \
'--version[Display version information and exit]' '(- *)'{-h,--help}'[Display help message and exit]' \
'(- *)'{-V,--version}'[Display version information and exit]'
# Local Variables: # Local Variables:
# mode: Shell-Script # mode: Shell-Script