summaryrefslogtreecommitdiff
path: root/debian/patches/0008-fix-screen-completion.diff
diff options
context:
space:
mode:
authorFrank Terbeck <ft@bewatermyfriend.org>2011-04-27 20:05:43 +0200
committerFrank Terbeck <ft@bewatermyfriend.org>2011-04-27 20:05:43 +0200
commitadb5ab78f1afe011f0b39d8d0528d0ce2c07bad7 (patch)
treee37a9b9a31b050b86b0aa9ec68f0232e5b372de7 /debian/patches/0008-fix-screen-completion.diff
parent8e3a365cd5328eaefa4bf2456c5cf9b41dae35b5 (diff)
downloadzsh-adb5ab78f1afe011f0b39d8d0528d0ce2c07bad7.tar.gz
zsh-adb5ab78f1afe011f0b39d8d0528d0ce2c07bad7.zip
Fix screen completion for serial devices (Closes: #623522)
Diffstat (limited to 'debian/patches/0008-fix-screen-completion.diff')
-rw-r--r--debian/patches/0008-fix-screen-completion.diff35
1 files changed, 35 insertions, 0 deletions
diff --git a/debian/patches/0008-fix-screen-completion.diff b/debian/patches/0008-fix-screen-completion.diff
new file mode 100644
index 000000000..e34557247
--- /dev/null
+++ b/debian/patches/0008-fix-screen-completion.diff
@@ -0,0 +1,35 @@
+This fix is included upstream:
+ <http://www.zsh.org/mla/workers/2011/msg00462.html>
+
+Index: pkg-zsh/Completion/Unix/Command/_screen
+===================================================================
+--- pkg-zsh.orig/Completion/Unix/Command/_screen 2011-04-27 20:01:05.000000000 +0200
++++ pkg-zsh/Completion/Unix/Command/_screen 2011-04-27 20:01:05.000000000 +0200
+@@ -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 @@
+ '-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