about summary refs log tree commit diff
path: root/Completion/User/_x_options
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/User/_x_options')
-rw-r--r--Completion/User/_x_options6
1 files changed, 5 insertions, 1 deletions
diff --git a/Completion/User/_x_options b/Completion/User/_x_options
index cd45c87f6..a9c18b0d1 100644
--- a/Completion/User/_x_options
+++ b/Completion/User/_x_options
@@ -2,4 +2,8 @@
 
 # A simple pattern completion, just as an example.
 
-compgen -J options -k '(-display -name -xrm)'
+if [ "$words[CURRENT-1]" = "-display" ]; then
+  compgen -k hosts -S':0'
+else
+  compadd -J options - -display -name -xrm
+fi