usr/src/cmd/zsh/Completion/Solaris/Command/_pkg5
author Cyril Plisko <cyril.plisko@grigale.com>
Tue, 23 Feb 2010 00:53:20 +0200
changeset 8 950f332cc02b
permissions -rw-r--r--
Import sfw build 134 Bugs Fixed ---------- 6760685 No MOTD (message of the day) when using zsh, /etc/zprofile is needed 6916058 BIND 9.6.1-P3 6918313 [OSOL B131] Crash of Mysql server SSL connection security problem (5.1.30)(x86 only) 6923497 new gnu patch doesn't like dom4j 6924198 Update fetchmail to version 6.3.14 6924379 zsh 4.3.10 6924496 audit_pkg no longer needed in OpenSolaris world 6924503 enable "new-style" zsh completion by default
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
8
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     1
#compdef pkg
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     2
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     3
_pkg5_pkgs() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     4
	local cache_policy cache_id=pkg5_installed_pkgs:$HOST:${pkg5_root//\//+}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     5
	typeset -a -g _pkg5_installed_pkgs
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     6
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     7
	zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     8
	if [[ -z "$cache_policy" ]]; then
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
     9
		zstyle ":completion:${curcontext}:" cache-policy _pkg5_installed_caching_policy
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    10
	fi
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    11
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    12
	if ( [[ $#_pkg5_installed_pkgs -eq 0 ]] || _cache_invalid $cache_id ) && ! _retrieve_cache $cache_id; then
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    13
		_pkg5_installed_pkgs=( $(
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    14
			pkg -R $pkg5_root list -H | while read pkg junk; do
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    15
				pkga=( ${(s:/:)pkg} )
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    16
				for i in {1..$#pkga}; do
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    17
					print ${(j:/:)${pkga[$i,-1]}}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    18
				done
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    19
			done) )
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    20
		_store_cache $cache_id _pkg5_installed_pkgs
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    21
	fi
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    22
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    23
	compadd "$@" - ${_pkg5_installed_pkgs}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    24
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    25
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    26
_pkg5_pkgs_a() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    27
	local cache_policy cache_id=pkg5_known_pkgs:$HOST:${pkg5_root//\//+}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    28
	typeset -a -g _pkg5_known_pkgs
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    29
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    30
	zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    31
	if [[ -z "$cache_policy" ]]; then
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    32
		zstyle ":completion:${curcontext}:" cache-policy _pkg5_known_caching_policy
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    33
	fi
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    34
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    35
	if ( [[ $#_pkg5_known_pkgs -eq 0 ]] || _cache_invalid $cache_id ) && ! _retrieve_cache $cache_id; then
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    36
		_pkg5_known_pkgs=( $(
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    37
			pkg -R $pkg5_root list -aH --no-refresh | while read pkg junk; do
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    38
				pkga=( ${(s:/:)pkg} )
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    39
				for i in {1..$#pkga}; do
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    40
					print ${(j:/:)${pkga[$i,-1]}}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    41
				done
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    42
			done) )
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    43
		_store_cache $cache_id _pkg5_known_pkgs
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    44
	fi
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    45
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    46
	compadd "$@" - ${_pkg5_known_pkgs}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    47
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    48
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    49
_pkg5_pubs() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    50
	compadd "$@" - $(pkg -R $pkg5_root publisher -H | awk '{print $1}')
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    51
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    52
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    53
_pkg5_variants() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    54
	compadd "$@" - $(pkg -R $pkg5_root variant -H | awk '{print $1}')
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    55
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    56
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    57
_pkg5_facets() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    58
	compadd "$@" - $(pkg -R $pkg5_root facet -H | awk '{print $1}')
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    59
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    60
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    61
_pkg5_properties() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    62
	compadd "$@" - $(pkg -R $pkg5_root property -H | awk '{print $1}')
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    63
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    64
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    65
_pkg5_known_caching_policy() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    66
	[[ $pkg5_root/var/pkg/state/known/catalog.attrs -nt "$1" ]]
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    67
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    68
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    69
_pkg5_installed_caching_policy() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    70
	[[ $pkg5_root/var/pkg/state/installed/catalog.attrs -nt "$1" ]]
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    71
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    72
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    73
_pkg5() {
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    74
	local expl context state line pkg5_root
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    75
	typeset -A opt_args
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    76
	local -a subcmds pkg5_actions pkg5_cattr pkg5_sattr
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    77
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    78
	subcmds=(
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    79
		install uninstall list image-update refresh version
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    80
		info search verify fix contents image-create history
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    81
		{change-,}{variant,facet}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    82
		{{un,}set-,}property {{un,}set-,}publisher
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    83
		purge-history rebuild-index
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    84
	)
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    85
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    86
	pkg5_actions=(
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    87
		set depend dir driver file group hardlink legacy license link
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    88
		signature unknown user
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    89
	)
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    90
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    91
	# Pseudo attributes for the contents subcommand
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    92
	pkg5_cattr=(
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    93
		action.hash action.key action.name action.raw
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    94
		pkg.fmri pkg.name pkg.publisher pkg.shortfmri
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    95
	)
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    96
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    97
	# Pseudo attributes for the search subcommand
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    98
	pkg5_sattr=(
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
    99
		$pkg5_cattr search.match search.match_type
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   100
	)
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   101
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   102
	if [[ $service == "pkg" ]]; then
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   103
		_arguments -C -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   104
			'(-\? --help)'{-\?,--help}'[Help]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   105
			'-R[Root directory]:directory:_path_files -/' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   106
			'*::command:->subcmd' && return 0
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   107
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   108
		if (( CURRENT == 1 )); then
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   109
			_wanted commands expl "pkg subcommand" compadd -a subcmds
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   110
			return
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   111
		fi
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   112
		service="$words[1]"
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   113
		curcontext="${curcontext%:*}=$service:"
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   114
	fi
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   115
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   116
	pkg5_root=${${${opt_args[-R]}:-$PKG_IMAGE}:-/}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   117
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   118
	case $service in
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   119
	("install")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   120
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   121
			'-n[Dry run]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   122
			'-q[Quiet]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   123
			'-v[Verbose]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   124
			"--no-refresh[Don't refresh catalogs]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   125
			"--no-index[Don't reindex search database]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   126
			'*:package:_pkg5_pkgs_a'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   127
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   128
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   129
	("uninstall")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   130
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   131
			'-n[Dry run]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   132
			'-q[Quiet]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   133
			'-r[Recursively uninstall dependencies]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   134
			'-v[Verbose]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   135
			"--no-index[Don't reindex search database]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   136
			'*:package:_pkg5_pkgs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   137
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   138
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   139
	("list")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   140
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   141
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   142
			'-a[Show not-installed packages]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   143
			'-f[Show all versions]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   144
			'-n[Show newest versions]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   145
			'-s[Show summaries]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   146
			'-u[Show upgradable versions]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   147
			'-v[Show verbose pkg: FMRIs]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   148
			"--no-refresh[Don't refresh catalogs]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   149
			'*:package:_pkg5_pkgs_a'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   150
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   151
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   152
	("image-update")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   153
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   154
			"-f[Don't check for pkg(5) updates]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   155
			'-n[Dry run]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   156
			'-q[Quiet]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   157
			'-v[Verbose]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   158
			'--be-name[Set new boot environment name]:name:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   159
			"--no-refresh[Don't refresh catalogs]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   160
			"--no-index[Don't reindex search database]"
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   161
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   162
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   163
	("refresh")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   164
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   165
			"--full[Full refresh]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   166
			'*:publisher:_pkg5_pubs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   167
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   168
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   169
	("info")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   170
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   171
			'--license[Display license text(s)]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   172
			'(-r)-l[Installed package]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   173
			'(-l)-r[Uninstalled package; fetch info from depot]:*:package:_pkg5_pkgs_a' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   174
			'*:package:_pkg5_pkgs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   175
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   176
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   177
	("search")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   178
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   179
			"(-p)-a[Show matching actions]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   180
			'-l[Local search]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   181
			'(-a)-p[Show packages]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   182
			'-r[Remote search]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   183
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   184
			'-I[Case sensitive search]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   185
			'-s[Depot URI]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   186
			'*-o[Attribute output]:attributes:_values -s , "attribute" $pkg5_sattr' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   187
			':query:'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   188
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   189
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   190
	("verify")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   191
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   192
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   193
			'-q[Quiet]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   194
			'-v[Verbose]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   195
			'*:package:_pkg5_pkgs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   196
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   197
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   198
	("fix")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   199
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   200
			'--accept[Force acceptance of license(s)]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   201
			'--licenses[Display license text(s)]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   202
			'*:package:_pkg5_pkgs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   203
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   204
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   205
	("contents")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   206
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   207
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   208
			'-m[Print raw manifests]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   209
			'*-a[Attribute matching]:attribute=pattern:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   210
			'*-o[Attribute output]:attributes:_values -s , "attribute" $pkg5_cattr' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   211
			'*-s[Sort key]:attribute:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   212
			'*-t[Action type]:action:_values -s , "action" $pkg5_actions' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   213
			'-r[Fetch manifests from depot]:*:package:_pkg5_pkgs_a' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   214
			'*:package:_pkg5_pkgs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   215
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   216
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   217
	("image-create")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   218
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   219
			'(-f --force)'{-f,--force}'[Force image creation]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   220
			'(-F --full -P --partial -U --user)'{-F,--full}'[Full image]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   221
			'(-F --full -P --partial -U --user)'{-P,--partial}'[Partial image]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   222
			'(-F --full -P --partial -U --user)'{-U,--user}'[User image]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   223
			'(-z --zone)'{-z,--zone}'[Zoned image]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   224
			'-k[Path to SSL key]:file:_path_files' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   225
			'-c[Path to SSL cert]:file:_path_files' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   226
			"--no-refresh[Don't refresh catalogs]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   227
			"*--variant[Specify image variants]:variant=instance:" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   228
			"*--facet[Specify image facets]:facet=True/False:" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   229
			'(-p --publisher)'{-p,--publisher}'[Specify publisher]:prefix=URI:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   230
			':directory:_path_files -/'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   231
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   232
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   233
	("change-variant")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   234
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   235
			'-n[Dry run]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   236
			'-q[Quiet'] \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   237
			'-v[Verbose'] \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   238
			'--be-name[Set new boot environment name]:name:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   239
			"*:variant:_values -s , 'variant' $(pkg -R $pkg5_root variant -H | awk '{print $1}')" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   240
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   241
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   242
	("change-facet")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   243
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   244
			'-n[Dry run]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   245
			'-q[Quiet'] \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   246
			'-v[Verbose'] \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   247
			'--be-name[Set new boot environment name]:name:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   248
			"*:facet:_values -s , 'facet' $(pkg -R $pkg5_root facet -H | awk '{print $1}')" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   249
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   250
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   251
	("variant")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   252
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   253
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   254
			'*:variant:_pkg5_variants'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   255
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   256
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   257
	("facet")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   258
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   259
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   260
			'*:facet:_pkg5_facets'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   261
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   262
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   263
	("set-property")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   264
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   265
			':property:_pkg5_properties' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   266
			':value:'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   267
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   268
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   269
	("unset-property")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   270
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   271
			'*:property:_pkg5_properties'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   272
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   273
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   274
	("property")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   275
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   276
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   277
			'*:property:_pkg5_properties'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   278
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   279
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   280
	("set-publisher")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   281
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   282
			'-P[Make preferred]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   283
			'(-e --enable)'{-e,--enable}'[Enable publisher]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   284
			'(-d --disable)'{-d,--disable}'[Disable publisher]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   285
			'(-g --add-origin)'{-g,--add-origin}'[Add origin URI]:uri:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   286
			'(-G --remove-origin)'{-G,--remove-origin}'[Remove origin URI]:uri:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   287
			'(-m --add-mirror)'{-m,--add-mirror}'[Add mirror URI]:uri:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   288
			'(-M --remove-mirror)'{-M,--remove-mirror}'[Remove mirror URI]:uri:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   289
			'-p[Repository URI]:url:' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   290
			"--no-refresh[Don't refresh catalogs]" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   291
			'--reset-uuid[Reset the image UUID for this publisher]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   292
			'--sticky[Make this publisher sticky]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   293
			'--non-sticky[Make this publisher non-sticky]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   294
			'--search-after[Set publisher search-order]:publisher:_pkg5_pubs' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   295
			'--search-before[Set publisher search-order]:publisher:_pkg5_pubs' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   296
			':publisher:_pkg5_pubs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   297
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   298
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   299
	("unset-publisher")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   300
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   301
			'*:publisher:_pkg5_pubs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   302
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   303
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   304
	("publisher")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   305
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   306
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   307
			'-P[Display only preferred publisher]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   308
			'-n[Display only enabled publishers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   309
			'*:publisher:_pkg5_pubs'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   310
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   311
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   312
	("history")
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   313
		_arguments -A "-*" \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   314
			'-H[Omit headers]' \
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   315
			'-l[Long history]'
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   316
		;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   317
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   318
	(*)
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   319
		_message "unknown pkg subcommand: $service" ;;
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   320
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   321
	esac
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   322
}
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   323
950f332cc02b Import sfw build 134
Cyril Plisko <cyril.plisko@grigale.com>
parents:
diff changeset
   324
_pkg5 "$@"