summary refs log tree commit diff
path: root/Completion/Unix
diff options
context:
space:
mode:
Diffstat (limited to 'Completion/Unix')
-rw-r--r--Completion/Unix/Command/_gcc6
-rw-r--r--Completion/Unix/Command/_make3
-rw-r--r--Completion/Unix/Command/_su2
-rw-r--r--Completion/Unix/Type/_files2
-rw-r--r--Completion/Unix/Type/_locales11
-rw-r--r--Completion/Unix/Type/_printers2
-rw-r--r--Completion/Unix/Type/_terminals2
-rw-r--r--Completion/Unix/Type/_time_zone2
8 files changed, 21 insertions, 9 deletions
diff --git a/Completion/Unix/Command/_gcc b/Completion/Unix/Command/_gcc
index e218a4414..6f105155d 100644
--- a/Completion/Unix/Command/_gcc
+++ b/Completion/Unix/Command/_gcc
@@ -1,13 +1,13 @@
-#compdef gcc g++ -T values LDFLAGS CFLAGS CPPFLAGS
+#compdef gcc g++ -value-,LDFLAGS,-default- -value-,CFLAGS,-default- -value-,CPPFLAGS,-default-
 
 local curcontext="$curcontext" state line ret=1 expl args args2
 typeset -A opt_args
 
-if [[ "$comptype" = values ]]; then
+if [[ "$service" = -value-* ]]; then
   compset -q
   words=( fake "$words[@]" )
   (( CURRENT++ ))
-  if [[ "$service" = LDFLAGS ]]; then
+  if [[ "$service" = *LDFLAGS ]]; then
     args2=( '-R:runtime path:->rundir' )
   else
     args2=()
diff --git a/Completion/Unix/Command/_make b/Completion/Unix/Command/_make
index 3402eb172..df28eac60 100644
--- a/Completion/Unix/Command/_make
+++ b/Completion/Unix/Command/_make
@@ -45,6 +45,7 @@ else
     fi
     _wanted targets expl 'make target' compadd -a tmp && return 0
   fi
+  compstate[parameter]="${PREFIX%%\=*}"
   compset -P 1 '*='
-  _files
+  _value "$@"
 fi
diff --git a/Completion/Unix/Command/_su b/Completion/Unix/Command/_su
index a1dd69db8..24fb5932e 100644
--- a/Completion/Unix/Command/_su
+++ b/Completion/Unix/Command/_su
@@ -17,4 +17,4 @@ fi
 shell="${${(M@)${(@f)$(</etc/passwd)}:#$usr*}##*:}"
 compset -n $base
 
-_dispatch comps $shell $shell:t -default-
+_dispatch $shell:t $shell $shell:t -default-
diff --git a/Completion/Unix/Type/_files b/Completion/Unix/Type/_files
index 4a57cdbc7..add41dbbe 100644
--- a/Completion/Unix/Type/_files
+++ b/Completion/Unix/Type/_files
@@ -1,4 +1,4 @@
-#compdef -T redirs -default-
+#compdef -redirect-,-default-,-default-
 
 local opts tmp glob pat pats expl tag i def descr end ign ret=1 match tried
 local type sdef
diff --git a/Completion/Unix/Type/_locales b/Completion/Unix/Type/_locales
new file mode 100644
index 000000000..ad5741c8a
--- /dev/null
+++ b/Completion/Unix/Type/_locales
@@ -0,0 +1,11 @@
+#compdef -value-,LANG,-default- -P -value-,LC_*,-default-
+
+local locales
+
+if (( $+commands[locale] )); then
+  locales=( $(_call_program locales locale -a) )
+else
+  locales=( /usr/lib/locale/*(:t) )
+fi
+
+_wanted locales expl locale compadd "$@" -a locales
diff --git a/Completion/Unix/Type/_printers b/Completion/Unix/Type/_printers
index 7229c1dc6..d736dd51d 100644
--- a/Completion/Unix/Type/_printers
+++ b/Completion/Unix/Type/_printers
@@ -1,4 +1,4 @@
-#compdef -T values PRINTER LPDEST
+#compdef -value-,PRINTER,-default- -value-,LPDEST,-default-
 
 local expl ret=1 list disp sep
 
diff --git a/Completion/Unix/Type/_terminals b/Completion/Unix/Type/_terminals
index 039430ad5..59f8d4d87 100644
--- a/Completion/Unix/Type/_terminals
+++ b/Completion/Unix/Type/_terminals
@@ -1,4 +1,4 @@
-#compdef infocmp -T values TERM
+#compdef infocmp -value-,TERM,-default-
 
 local desc expl
 
diff --git a/Completion/Unix/Type/_time_zone b/Completion/Unix/Type/_time_zone
index 215d8bd4a..5bad7329b 100644
--- a/Completion/Unix/Type/_time_zone
+++ b/Completion/Unix/Type/_time_zone
@@ -1,4 +1,4 @@
-#compdef -T values TZ
+#compdef -value-,TZ,-default-
 
 local expl