Update ldattach

This commit is contained in:
Shohei YOSHIDA 2025-08-05 09:35:33 +09:00
parent bdee8a976c
commit 0032bac859
No known key found for this signature in database
GPG Key ID: C9A1BB11BB940CF2
1 changed files with 23 additions and 13 deletions

View File

@ -28,24 +28,34 @@
# Description # Description
# ----------- # -----------
# #
# Completion script for ldattach - attach a line discipline to a serial line # Completion script for ldattach 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