Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

[PATCH 3/4] _screen: fix session completion (ALT#16702).



screen -ls prints pretty header and footer on stderr.  Filter it out
(patch by Evgenii Terechkov <evg@xxxxxxxxxxxx>).

Signed-off-by: Alexey I. Froloff <raorn@xxxxxxxxxxxx>
---
 Completion/Unix/Command/_screen |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Completion/Unix/Command/_screen b/Completion/Unix/Command/_screen
index be0e355..67c453a 100644
--- a/Completion/Unix/Command/_screen
+++ b/Completion/Unix/Command/_screen
@@ -98,19 +98,19 @@ if [[ -n $state ]]; then
     attached-sessions)
       sessions=(
         ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \
-            -ls)"}:#*[Aa]ttached*}##[[:blank:]]}%%[[:blank:]]*}
+            -ls 2>/dev/null)"}:#*[Aa]ttached*}##[[:blank:]]}%%[[:blank:]]*}
       )
     ;;
     detached-sessions)
       sessions=(
         ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \
-            -ls)"}:#*[Dd]etached*}##[[:blank:]]}%%[[:blank:]]*}
+            -ls 2>/dev/null)"}:#*[Dd]etached*}##[[:blank:]]}%%[[:blank:]]*}
       )
     ;;
     any-sessions)
       sessions=(
         ${${${(M)${(f)"$(_call_program screen-sessions $words[1] \
-	    -ls)"}:#*tached*}##[[:blank:]]}%%[[:blank:]]*}
+	    -ls 2>/dev/null)"}:#*tached*}##[[:blank:]]}%%[[:blank:]]*}
       )
   esac
 
-- 
1.6.1.3.GIT



Messages sorted by: Reverse Date, Date, Thread, Author