1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
|
#compdef cpack
# ------------------------------------------------------------------------------
# Copyright (c) 2026 Github zsh-users - https://github.com/zsh-users
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
# "Software"), to deal in the Software without restriction, including
# without limitation the rights to use, copy, modify, merge, publish,
# distribute, sublicense, and/or sell copies of the Software, and to
# permit persons to whom the Software is furnished to do so, subject to
# the following conditions:
#
# The above copyright notice and this permission notice shall be included
# in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
# OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
# ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
# OTHER DEALINGS IN THE SOFTWARE.
# ------------------------------------------------------------------------------
# Description
# -----------
#
# Completion script for cpack 4.3.0 (https://kitware.com/cmake)
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Shohei Yoshida (https://github.com/syohex) <syohex@gmail.com>
#
# ------------------------------------------------------------------------------
_cpack() {
local ret=1
_arguments \
'-G[Override/define CPACK_GENERATOR]:generator:_cpack_generators' \
'-C[Specify the project configurations]:configuration:(Debug Release)' \
'*-D[Set a CPack variable]:var_val' \
'--config[Specify the config file]:file:_files' \
'(-V --verbose)'{-V,--verbose}'[Enable verbose output]' \
'--trace[Put underlying cmake scripts in trace mode]' \
'--trace-expand[Put underlying cmake scripts in expanded trace mode]' \
'--debug[Enable debug output]' \
'-P[Override/define CPACK_PACKAGE_NAME]:package_name' \
'-R[Override/define CPACK_PACKAGE_VERSION]:package_version' \
'-B[Override/define CPACK_PACKAGE_DIRECTORY]:package_directory:_files -/' \
'--vendor[Override/define CPACK_PACKAGE_VENDOR]:vendor' \
'--preset[Read arguments from a package preset]' \
'--list-presets[List available package preset]' \
'(- *)'{--version,-version}=-'[Print version number and exit]::format:(json-v1)' \
'(- *)--help[Print usage information and exit]' \
'(- *)--help-full[Print all help manuals and exit]' \
'(- *)--help-manual[Print one help manual and exit]:manual:_cpack_help_manuals' \
'(- *)--help-manual-list[List help manuals available and exit]' \
'(- *)--help-command[Print help for one command and exit]:command:_cpack_help_commands' \
'(- *)--help-command-list[List commands with help available and exit]' \
'(- *)--help-commands[Print cmake-commands manual and exit]' \
'(- *)--help-module[Print help for one module and exit]:module:_cpack_help_modules' \
'(- *)--help-module-list[List modules with help available and exit]' \
'(- *)--help-modules[Print cmake-modules manual and exit]' \
'(- *)--help-policy[Print help for one policy and exit]:policy:_cpack_help_policies' \
'(- *)--help-policy-list[List policies with help available and exit]' \
'(- *)--help-policies[Print cmake-policies manual and exit]' \
'(- *)--help-property[Print help for one property and exit]:property:_cpack_help_properties' \
'(- *)--help-property-list[List properties with help available and exit]' \
'(- *)--help-properties[Print cmake-properties manual and exit]' \
'(- *)--help-variable[Print help for one variable and exit]:variable:_cpack_help_variables' \
'(- *)--help-variable-list[List variables with help available and exit]' \
'(- *)--help-variables[Print cmake-variables manual and exit]' \
&& ret=0
return ret
}
_cpack_generators() {
local -a generators=(
"7Z:[7-Zip file format with default compression algorithm]"
"7Z_BZ2:[7-Zip file format with BZip2 compression]"
"7Z_DEFLATE:[7-Zip file format with Deflate compression]"
"7Z_LZMA:[7-Zip file format with LZMA compression]"
"7Z_LZMA2:[7-Zip file format with LZMA2 compression]"
"7Z_PPMD:[7-Zip file format with PPMd compression]"
"7Z_STORE:[7-Zip file format without compression]"
"7Z_ZSTD:[7-Zip file format with Zstandard compression]"
"AppImage:[AppImage packages]"
"DEB:[Debian packages]"
"External:[CPack External packages]"
"IFW:[Qt Installer Framework]"
"INNOSETUP:[Inno Setup packages]"
"NSIS:[Null Soft Installer]"
"NSIS64:[Null Soft Installer (64-bit)]"
"NuGet:[NuGet packages]"
"RPM:[RPM packages]"
"STGZ:[Self extracting Tar GZip compression]"
"TAR:[Tar no compression]"
"TBZ2:[Tar BZip2 compression]"
"TGZ:[Tar GZip compression]"
"TXZ:[Tar XZ compression]"
"TZ:[Tar Compress compression]"
"TZST:[Tar Zstandard compression]"
"ZIP:[ZIP file format with default compression algorithm]"
"ZIP_BZ2:[ZIP file format with BZip2 compression]"
"ZIP_DEFLATE:[ZIP file format with Deflate compression]"
"ZIP_LZMA:[ZIP file format with LZMA compression]"
"ZIP_LZMA2:[ZIP file format with LZMA2 compression]"
"ZIP_STORE:[ZIP file format without compression]"
"ZIP_ZSTD:[ZIP file format with Zstandard compression]"
)
_describe -t 'generators' generator generators
}
_cpack_help_manuals() {
local -a manuals=(${(f)"$(cpack --help-manual-list 2>/dev/null | sed 's/([0-9][0-9]*)$//' )"})
_values 'manual' $manuals
}
_cpack_help_commands() {
local -a commands=(${(f)"$(cpack --help-command-list 2>/dev/null )"})
_values 'command' $commands
}
_cpack_help_modules() {
local -a modules=(${(f)"$(cpack --help-module-list 2>/dev/null )"})
_values 'module' $modules
}
_cpack_help_policies() {
local -a policies=(${(f)"$(cpack --help-policy-list 2>/dev/null )"})
_values 'policy' $policies
}
_cpack_help_properties() {
local -a properties=(${(f)"$(cpack --help-property-list 2>/dev/null )"})
_values 'property' $properties
}
_cpack_help_variables() {
local -a variables=(${(f)"$(cpack --help-variable-list 2>/dev/null )"})
_values 'variable' $variables
}
_cpack "$@"
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et
|