mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-13 23:31:08 +02:00
29027: _screen: support "/dev/ttyUSB0 [baud]"-style arguments.
This commit is contained in:
parent
37bb9f7353
commit
2b9f9b59e2
2 changed files with 17 additions and 2 deletions
|
@ -3,6 +3,9 @@
|
||||||
* Valentin Haenel: 29019, Completion/Unix/Command/_git: Fix git
|
* Valentin Haenel: 29019, Completion/Unix/Command/_git: Fix git
|
||||||
stash completion (apply and pop subcommands).
|
stash completion (apply and pop subcommands).
|
||||||
|
|
||||||
|
* 29027: Completion/Unix/Command/_screen: support "/dev/ttyUSB0
|
||||||
|
[baud]"-style arguments.
|
||||||
|
|
||||||
2011-04-19 Peter Stephenson <pws@csr.com>
|
2011-04-19 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
* unposted: Completion/X/Command/.distfiles, Config/version.mk:
|
* unposted: Completion/X/Command/.distfiles, Config/version.mk:
|
||||||
|
@ -14490,5 +14493,5 @@
|
||||||
|
|
||||||
*****************************************************
|
*****************************************************
|
||||||
* This is used by the shell to define $ZSH_PATCHLEVEL
|
* This is used by the shell to define $ZSH_PATCHLEVEL
|
||||||
* $Revision: 1.5255 $
|
* $Revision: 1.5256 $
|
||||||
*****************************************************
|
*****************************************************
|
||||||
|
|
|
@ -3,6 +3,18 @@
|
||||||
local curcontext="$curcontext" state line expl
|
local curcontext="$curcontext" state line expl
|
||||||
local scr_cmds sessions
|
local scr_cmds sessions
|
||||||
|
|
||||||
|
function __screen_normal() {
|
||||||
|
if (( CURRENT == 1 )) && [[ $PREFIX == /dev/* ]]; then
|
||||||
|
_path_files -g '*(%)'
|
||||||
|
elif (( CURRENT == 2 )) && [[ ${words[1]} == /dev/* ]]; then
|
||||||
|
_message "baud rate"
|
||||||
|
elif (( CURRENT > 2 )) && [[ ${words[1]} == /dev/* ]]; then
|
||||||
|
_message "no more parameters"
|
||||||
|
else
|
||||||
|
_normal "$@"
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
scr_cmds=(
|
scr_cmds=(
|
||||||
acladd aclchg acldel aclgrp
|
acladd aclchg acldel aclgrp
|
||||||
aclumask activity addacl allpartial
|
aclumask activity addacl allpartial
|
||||||
|
@ -91,7 +103,7 @@ _arguments -C \
|
||||||
'-Dx: :->any-sessions' \
|
'-Dx: :->any-sessions' \
|
||||||
'-dx: :->any-sessions' \
|
'-dx: :->any-sessions' \
|
||||||
'-X[execute command as a screen command in the specified session]:screencmd:(${scr_cmds[@]})' \
|
'-X[execute command as a screen command in the specified session]:screencmd:(${scr_cmds[@]})' \
|
||||||
'*::arguments: _normal'
|
'*::arguments: __screen_normal'
|
||||||
|
|
||||||
if [[ -n $state ]]; then
|
if [[ -n $state ]]; then
|
||||||
case $state in
|
case $state in
|
||||||
|
|
Loading…
Reference in a new issue