about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/Command/_xrandr7
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/X/Command/_xrandr b/Completion/X/Command/_xrandr
index b0851569e..26d8cd082 100644
--- a/Completion/X/Command/_xrandr
+++ b/Completion/X/Command/_xrandr
@@ -58,8 +58,11 @@ case $state in
     esac
   ;;
   outputs)
-    _wanted outputs expl output compadd \
-        ${(uo)${(M)${(f)"$(_call_program outputs xrandr)"}:#* connected*}%% *} && return 0
+    local -a xrandr_output=(${(f)"$(_call_program outputs xrandr)"})
+    _alternative \
+	'connected:connected outputs:('${(j: :)${(uo)${(M)xrandr_output:#* connected*}%% *}}')' \
+	'disconnected:disconnected outputs:('${(j: :)${(uo)${(M)xrandr_output:#* disconnected*}%% *}}')' \
+	&& return 0
   ;;
   modes)
     _wanted modes expl mode compadd \