From 45f9a36216637075172d0bdf7ad8e18fad34c42e Mon Sep 17 00:00:00 2001 From: Sven Wischnowsky Date: Wed, 13 Mar 2002 09:28:04 +0000 Subject: remove that -T option to compdef again and instead use comma-separated sub-contexts both for function and style lookup (16819) --- Completion/Unix/Command/_gcc | 6 +++--- Completion/Unix/Command/_make | 3 ++- Completion/Unix/Command/_su | 2 +- Completion/Unix/Type/_files | 2 +- Completion/Unix/Type/_locales | 11 +++++++++++ Completion/Unix/Type/_printers | 2 +- Completion/Unix/Type/_terminals | 2 +- Completion/Unix/Type/_time_zone | 2 +- 8 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 Completion/Unix/Type/_locales (limited to 'Completion/Unix') 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)$(