about summary refs log tree commit diff
path: root/Completion/X
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-11-12 15:28:24 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-11-12 15:28:24 +0000
commite6282df1155e8d9b08b2e518a452c1997973f1ce (patch)
treeb0c8ed7e8512cc4397ae7df6d138ea66147565b3 /Completion/X
parent167b0ae3b98938f75287dcf2e112d41a03532c5f (diff)
downloadzsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.gz
zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.tar.xz
zsh-e6282df1155e8d9b08b2e518a452c1997973f1ce.zip
manual/8630
Diffstat (limited to 'Completion/X')
-rw-r--r--Completion/X/_x_color2
-rw-r--r--Completion/X/_x_cursor2
-rw-r--r--Completion/X/_x_display2
-rw-r--r--Completion/X/_x_extension2
-rw-r--r--Completion/X/_x_font2
-rw-r--r--Completion/X/_x_keysym2
-rw-r--r--Completion/X/_x_modifier2
-rw-r--r--Completion/X/_x_window2
-rw-r--r--Completion/X/_xmodmap10
9 files changed, 22 insertions, 4 deletions
diff --git a/Completion/X/_x_color b/Completion/X/_x_color
index 0cbcdf0eb..4c1c73bf4 100644
--- a/Completion/X/_x_color
+++ b/Completion/X/_x_color
@@ -29,6 +29,8 @@ if (( ! $+_color_cache )); then
   (( $#_color_cache )) || _color_cache=(white black gray red blue green)
 fi
 
+_tags any colors || return 1
+
 _description expl 'color specification'
 compadd "$@" "$expl[@]" -M 'm:{a-z}={A-Z} m:-=\  r:|[ A-Z0-9]=* r:|=*' - \
         "$_color_cache[@]"
diff --git a/Completion/X/_x_cursor b/Completion/X/_x_cursor
index 59ecb5976..a22189f9d 100644
--- a/Completion/X/_x_cursor
+++ b/Completion/X/_x_cursor
@@ -14,5 +14,7 @@ if (( ! $+_cursor_cache )); then
   fi
 fi
 
+_tags any cursors || return 1
+
 _description expl 'cursor name'
 compadd "$@" "$expl[@]" -M 'm:-=_ r:|_=*' - "$_cursor_cache[@]"
diff --git a/Completion/X/_x_display b/Completion/X/_x_display
index e3f9af479..7b9fbab9a 100644
--- a/Completion/X/_x_display
+++ b/Completion/X/_x_display
@@ -1,3 +1,5 @@
 #autoload
 
+_tags any displays || return 1
+
 _hosts -S ':0 ' -r :
diff --git a/Completion/X/_x_extension b/Completion/X/_x_extension
index 967938e28..44e47d956 100644
--- a/Completion/X/_x_extension
+++ b/Completion/X/_x_extension
@@ -2,6 +2,8 @@
 
 local expl
 
+_tags any extensions || return 1
+
 (( $+_xe_cache )) || _xe_cache=( "${(@)${(@f)$(xdpyinfo)}[(r)number of extensions:*,-1][2,(r)default screen number:*][1,-2]//[      ]}" )
 
 _description expl 'X extension'
diff --git a/Completion/X/_x_font b/Completion/X/_x_font
index 4ba21ddff..f4dfef79c 100644
--- a/Completion/X/_x_font
+++ b/Completion/X/_x_font
@@ -2,6 +2,8 @@
 
 local expl
 
+_tags any fonts || return 1
+
 # This *has* to be improved some day...
 
 if (( ! $+_font_cache )); then
diff --git a/Completion/X/_x_keysym b/Completion/X/_x_keysym
index 6b031014a..fc2847c57 100644
--- a/Completion/X/_x_keysym
+++ b/Completion/X/_x_keysym
@@ -2,6 +2,8 @@
 
 local expl
 
+_tags any keysyms || return 1
+
 if (( ! $+_keysym_cache )); then
   local file
 
diff --git a/Completion/X/_x_modifier b/Completion/X/_x_modifier
index a9276ab71..345243835 100644
--- a/Completion/X/_x_modifier
+++ b/Completion/X/_x_modifier
@@ -2,6 +2,8 @@
 
 local expl
 
+_tags any modifiers || return 1
+
 _description expl modifier
 compadd "$@" "$expl[@]" -M 'm:{a-z}={A-Z}' - \
         Shift Lock Control Mod1 Mod2 Mod3 Mod4 Mod5
diff --git a/Completion/X/_x_window b/Completion/X/_x_window
index 65d2b72e2..6d6e3112e 100644
--- a/Completion/X/_x_window
+++ b/Completion/X/_x_window
@@ -2,6 +2,8 @@
 
 local list expl
 
+_tags any windows || return 1
+
 list=( "${(@)${(M@)${(@f)$(xwininfo -root -tree)}:#[ 	]#0x[0-9a-f]# \"*}##[ 	]#}" )
 
 if [[ "$1" = -n ]]; then
diff --git a/Completion/X/_xmodmap b/Completion/X/_xmodmap
index 4e7a8bfc8..d8ba420ce 100644
--- a/Completion/X/_xmodmap
+++ b/Completion/X/_xmodmap
@@ -1,6 +1,6 @@
 #compdef xmodmap
 
-local state line ret=1
+local context state line ret=1
 typeset -A opt_args
 
 _x_arguments \
@@ -82,9 +82,11 @@ if [[ -n "$state" ]]; then
     [[ "$what" = *ksym* ]] && _x_keysym "$suf[@]" && ret=0
 
   else
-    _description expl command
-    compadd "$expl[@]" -S ' ' keycode keysym clear add remove && ret=0
-    compadd "$expl[@]" -S ' = ' pointer && ret=0
+    if _tags any commands; then
+      _description expl command
+      compadd "$expl[@]" -S ' ' keycode keysym clear add remove && ret=0
+      compadd "$expl[@]" -S ' = ' pointer && ret=0
+    fi
   fi
 fi