1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2025-09-02 22:11:54 +02:00

38424: Use _baudrates helper instead of _baudrate

This commit is contained in:
Frank Terbeck 2016-05-08 00:09:13 +02:00
parent 32b5cd9445
commit 795b285ce8
6 changed files with 10 additions and 5 deletions

View file

@ -6,6 +6,11 @@
* 38426: Completion/Unix/Type/_baudrates: _baudrates: Use 2 space
indentation
* 38424: Completion/BSD/Command/_cu, Completion/Unix/Command/_gdb,
Completion/Unix/Command/_joe, Completion/Unix/Command/_picocom,
Completion/Unix/Command/_screen: Use _baudrates helper instead of
_baudrate
2016-05-06 Daniel Shahaf <d.s@daniel.shahaf.name>
* 38401: Completion/Debian/Type/_deb_packages: New completion

View file

@ -3,5 +3,5 @@
_arguments -s -A '-*' \
'-d[do not block waiting for a carrier to be detected]' \
'-l[line to use]:line:(/dev/(cuaU#<->|ttyS<->)(N%c))' \
'-s[line speed]:line speed:_baudrate -d "line speed"' \
'-s[line speed]:line speed:_baudrates -d "line speed"' \
'(-*)1:host:'

View file

@ -37,7 +37,7 @@ else
(-[csx]) _files && return 0 ;;
(-e) _description files expl executable
_files "$expl[@]" -g '*(-*)' && return 0 ;;
(-b) _baudrate && return 0 ;;
(-b) _baudrates && return 0 ;;
esac
w=( "${(@)words[2,-1]}" )

View file

@ -3,7 +3,7 @@
_arguments \
'-asis[characters with codes >127 will be displayed non-inverted]' \
'-backpath[backup file directory]:backup file directory:_files -/' \
'-baud[inserts delays for baud rates below 19200]:baud rate:_baudrate' \
'-baud[inserts delays for baud rates below 19200]:baud rate:_baudrates' \
'-beep[beep on command errors or when cursor goes past extremes]' \
'-columns[sets the number of screen columns]:num of columns' \
'-csmode[continued search mode]' \

View file

@ -32,7 +32,7 @@ function _picocom_escape () {
function _picocom () {
local -a args
args=( '(--baud -b)'{--baud,-b}'[define baud-rate to set the terminal to]:baud rate:_baudrate'
args=( '(--baud -b)'{--baud,-b}'[define baud-rate to set the terminal to]:baud rate:_baudrates'
'(--flow -f)'{--flow,-f}'[define type of flow control to use]:flow control:_picocom_flowcontrol'
'(--parity -p)'{--parity,-p}'[define type of parity to use]:parity mode:_picocom_paritymode'
'(--databits -d)'{--databits,-d}'[define the number of databits per word]:data bits:_picocom_databits'

View file

@ -99,7 +99,7 @@ if [[ -n $state ]]; then
if (( CURRENT == 1 )) && [[ $PREFIX == /dev/* ]]; then
_path_files -g '*(%)'
elif (( CURRENT == 2 )) && [[ ${words[1]} == /dev/* ]]; then
_baudrate
_baudrates
elif (( CURRENT > 2 )) && [[ ${words[1]} == /dev/* ]]; then
_message "no more parameters"
else