* PATCH: _screen: support /dev/ttyUSB0 [baud] arguments
@ 2011-04-21 20:38 Frank Terbeck
0 siblings, 0 replies; only message in thread
From: Frank Terbeck @ 2011-04-21 20:38 UTC (permalink / raw)
To: zsh-workers
This fixes debian bug #623522:
<http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=623522>
Regards, Frank
---
Completion/Unix/Command/_screen | 14 +++++++++++++-
1 files changed, 13 insertions(+), 1 deletions(-)
diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen
index 4d3b089..931946c 100644
--- a/Completion/Unix/Command/_screen
+++ b/Completion/Unix/Command/_screen
@@ -3,6 +3,18 @@
local curcontext="$curcontext" state line expl
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=(
acladd aclchg acldel aclgrp
aclumask activity addacl allpartial
@@ -91,7 +103,7 @@ _arguments -C \
'-Dx: :->any-sessions' \
'-dx: :->any-sessions' \
'-X[execute command as a screen command in the specified session]:screencmd:(${scr_cmds[@]})' \
- '*::arguments: _normal'
+ '*::arguments: __screen_normal'
if [[ -n $state ]]; then
case $state in
--
1.7.4.1.140.g89781
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2011-04-21 20:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-04-21 20:38 PATCH: _screen: support /dev/ttyUSB0 [baud] arguments Frank Terbeck
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).