Debian Codegraph @

upstream/debian-unstable/man7/dnf5-aliases.7

raw
1 .\" Man page generated from reStructuredText
2 .\" by the Docutils 0.22.4 manpage writer.
3 .
4 .
5 .nr rst2man-indent-level 0
6 .
7 .de1 rstReportMargin
8 \\$1 \\n[an-margin]
9 level \\n[rst2man-indent-level]
10 level margin: \\n[rst2man-indent\\n[rst2man-indent-level]]
11 -
12 \\n[rst2man-indent0]
13 \\n[rst2man-indent1]
14 \\n[rst2man-indent2]
15 ..
16 .de1 INDENT
17 .\" .rstReportMargin pre:
18 . RS \\$1
19 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin]
20 . nr rst2man-indent-level +1
21 .\" .rstReportMargin post:
22 ..
23 .de UNINDENT
24 . RE
25 .\" indent \\n[an-margin]
26 .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]]
27 .nr rst2man-indent-level -1
28 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]]
29 .in \\n[rst2man-indent\\n[rst2man-indent-level]]u
30 ..
31 .TH "DNF5-ALIASES" "7" "May 09, 2026" "" "dnf5"
32 .SH NAME
33 dnf5-aliases \- Aliases for command line arguments
34 .SH DESCRIPTION
35 .sp
36 It is possible to define custom aliases which can be then used as dnf commands or options to abbreviate longer
37 command and option sequences.
38 .sp
39 The aliases can be configured in the TOML format and the configuration files are loaded from these drop\-in
40 directories:
41 .INDENT 0.0
42 .INDENT 3.5
43 .INDENT 0.0
44 .IP \(bu 2
45 \fB/usr/share/dnf5/aliases.d/\fP
46 .IP \(bu 2
47 \fB/etc/dnf/dnf5\-aliases.d/\fP
48 .IP \(bu 2
49 \fB$XDG_CONFIG_HOME/dnf5/aliases.d/\fP
50 .UNINDENT
51 .UNINDENT
52 .UNINDENT
53 .SS Syntax:
54 .sp
55 The configuration file must begin with the \fBversion\fP attribute set to a required version, for example:
56 .INDENT 0.0
57 .INDENT 3.5
58 .sp
59 .EX
60 version = \(aq1.1\(aq
61 .EE
62 .UNINDENT
63 .UNINDENT
64 .sp
65 Each alias is defined in a separate section, using \fBkey = value\fP pairs, for example:
66 .INDENT 0.0
67 .INDENT 3.5
68 .sp
69 .EX
70 [\(aqin\(aq]
71 type = \(aqcommand\(aq
72 attached_command = \(aqinstall\(aq
73 descr.C = \(dqAlias for \(aqinstall\(aq\(dq
74 descr.cs_CZ = \(dqAlias pro \(aqinstall\(aq\(dq
75 .EE
76 .UNINDENT
77 .UNINDENT
78 .sp
79 The section name uniquely identifies the alias. It is in a form of a path, i.e. one or more strings separated by dots,
80 which defines the scope of the alias. For example, string \(dqgroup.list.in\(dq would identify an alias usable only within
81 the scope of the group list subcommand.
82 .sp
83 There are the following types of aliases:
84 .INDENT 0.0
85 .INDENT 3.5
86 .INDENT 0.0
87 .IP \(bu 2
88 command
89 .IP \(bu 2
90 cloned_named_arg
91 .IP \(bu 2
92 named_arg
93 .IP \(bu 2
94 group
95 .UNINDENT
96 .UNINDENT
97 .UNINDENT
98 .SS Type: command
99 .sp
100 The \fBcommand\fP alias defines an alias for a command.
101 .INDENT 0.0
102 .TP
103 .B Keys:
104 .INDENT 7.0
105 .IP \(bu 2
106 \fBtype\fP \- Must have value \fBcommand\fP\&.
107 .IP \(bu 2
108 \fBattached_command\fP \- Path to a command for which this alias is defined.
109 .IP \(bu 2
110 \fBdescr.<locale>\fP – Description that will be shown in help. \fBdescr.C\fP is used if a description
111 for the appropriate locale is not found. Added in config file version 1.1.
112 .IP \(bu 2
113 \fBdescr\fP – Description that will be shown in help. Deprecated in version 1.1, but remains backward
114 compatible. Does not support locales.
115 .IP \(bu 2
116 \fBgroup_id\fP \- A group this alias is part of if any.
117 .IP \(bu 2
118 \fBcomplete\fP \- Whether bash autocompletion should be used for this alias, default is false.
119 .IP \(bu 2
120 \fBrequired_values\fP \- Values (positional arguments) consumed by the command alias. The format is
121 an array of tables; each must include either \fIvalue_help.<locale>\fP for the active locale or
122 \fIvalue_help.C\fP, and may optionally include \fIdescr.<locale>\fP\&. The default is an empty array.
123 Added in config file version 1.1.
124 .IP \(bu 2
125 \fBattached_named_args\fP \- Options that will be used with the command. The format is an array of tables,
126 each of which must contain an \fBid_path\fP key to specify the path to an option, and may contain also
127 a \fBvalue\fP key to specify the value of the option. The \fBvalue\fP can contain \fB${index}\fP placeholders,
128 which are replaced by values consumed by the command alias (as defined by \fBrequired_values\fP).
129 Command arguments start at index 1. Index 0 refers to the command alias itself.
130 If no \fBvalue\fP key is provided, an empty string will be passed to named arguments that expect a value.
131 .UNINDENT
132 .UNINDENT
133 .sp
134 The required keys are \fBtype\fP, and \fBattached_command\fP\&.
135 .INDENT 0.0
136 .TP
137 .B Examples:
138 .INDENT 7.0
139 .IP \(bu 2
140 Alias \fBgrouplist\fP for \fBgroup list\fP:
141 .INDENT 2.0
142 .INDENT 3.5
143 .sp
144 .EX
145 [\(aqgrouplist\(aq]
146 type = \(aqcommand\(aq
147 attached_command = \(aqgroup.list\(aq
148 descr.C = \(dqAlias for \(aqgroup list\(aq\(dq
149 descr.cs_CZ = \(dqAlias pro \(aqgroup list\(aq\(dq
150 .EE
151 .UNINDENT
152 .UNINDENT
153 .IP \(bu 2
154 Alias \fBgroup.ls\fP for \fBgroup list\fP:
155 .INDENT 2.0
156 .INDENT 3.5
157 .sp
158 .EX
159 [\(aqgroup.ls\(aq]
160 type = \(aqcommand\(aq
161 attached_command = \(aqgroup.list\(aq
162 descr.C = \(dqAlias for \(aqgroup list\(aq\(dq
163 descr.cs_CZ = \(dqAlias pro \(aqgroup list\(aq\(dq
164 complete = true
165 .EE
166 .UNINDENT
167 .UNINDENT
168 .IP \(bu 2
169 Alias \fBlist\-fedora\-all\fP for \fB\-\-repo=fedora list \-\-showduplicates\fP:
170 .INDENT 2.0
171 .INDENT 3.5
172 .sp
173 .EX
174 [\(aqlist\-fedora\-all\(aq]
175 type = \(aqcommand\(aq
176 attached_command = \(aqlist\(aq
177 descr.C = \(dqAlias for \(aq\-\-repo=fedora list \-\-showduplicates\(aq\(dq
178 descr.cs_CZ = \(dqAlias pro \(aq\-\-repo=fedora list \-\-showduplicates\(aq\(dq
179 complete = true
180 attached_named_args = [
181 { id_path = \(aqrepo\(aq, value = \(aqfedora\(aq },
182 { id_path = \(aqlist.showduplicates\(aq }
183 ]
184 .EE
185 .UNINDENT
186 .UNINDENT
187 .IP \(bu 2
188 Alias \fBwhatrequires\fP for \fBrepoquery \-\-installed \-\-whatrequires=<requires_first_argument>\fP:
189 .INDENT 2.0
190 .INDENT 3.5
191 .sp
192 .EX
193 [\(aqwhatrequires\(aq]
194 type = \(aqcommand\(aq
195 attached_command = \(aqrepoquery\(aq
196 descr = \(aqAlias for \(dqrepoquery \-\-installed \-\-whatrequires=<whatrequires_first_argument>\(dq\(aq
197 complete = true
198
199 [[whatrequires.required_values]]
200 value_help.C = \(aqCAPABILITY,...\(aq
201 descr.C = \(aqLimit to packages that require any of <capabilities>.\(aq
202 descr.cs_CZ = \(aqOmezí se na balíčky vyžadující něco z <capabilities>.\(aq
203
204 [[whatrequires.attached_named_args]]
205 id_path = \(aqrepoquery.installed\(aq
206
207 [[whatrequires.attached_named_args]]
208 id_path = \(aqrepoquery.whatrequires\(aq
209 value=\(aq${1}\(aq
210 .EE
211 .UNINDENT
212 .UNINDENT
213 .UNINDENT
214 .UNINDENT
215 .SS Type: cloned_named_arg
216 .sp
217 The \fBcloned_named_arg\fP alias defines another name for a given option.
218 .INDENT 0.0
219 .TP
220 .B Keys:
221 .INDENT 7.0
222 .IP \(bu 2
223 \fBtype\fP \- Must have value \fBcloned_named_arg\fP\&.
224 .IP \(bu 2
225 \fBlong_name\fP \- Name of the alias option.
226 .IP \(bu 2
227 \fBshort_name\fP \- One\-letter shortcut of the name.
228 .IP \(bu 2
229 \fBsource\fP \- Path to the option for which this alias is defined.
230 .IP \(bu 2
231 \fBgroup_id\fP \- A group this alias is part of if any.
232 .IP \(bu 2
233 \fBcomplete\fP \- Whether bash autocompletion should be used for this alias, default is false.
234 .UNINDENT
235 .UNINDENT
236 .sp
237 The required keys are \fBtype\fP, either \fBlong_name\fP or \fBshort_name\fP, and \fBsource\fP\&.
238 .INDENT 0.0
239 .TP
240 .B Examples:
241 .INDENT 7.0
242 .IP \(bu 2
243 Alias \fB\-\-nobest\fP for \fB\-\-no\-best\fP:
244 .INDENT 2.0
245 .INDENT 3.5
246 .sp
247 .EX
248 [\(aqnobest\(aq]
249 type = \(aqcloned_named_arg\(aq
250 long_name = \(aqnobest\(aq
251 source = \(aqno\-best\(aq
252 .EE
253 .UNINDENT
254 .UNINDENT
255 .IP \(bu 2
256 Alias \fBrepoquery \-\-list\fP or \fBrepoquery \-l\fP for \fBrepoquery \-\-files\fP:
257 .INDENT 2.0
258 .INDENT 3.5
259 .sp
260 .EX
261 [\(aqrepoquery.list\(aq]
262 type = \(aqcloned_named_arg\(aq
263 long_name = \(aqlist\(aq
264 short_name = \(aql\(aq
265 source = \(aqrepoquery.files\(aq
266 .EE
267 .UNINDENT
268 .UNINDENT
269 .UNINDENT
270 .UNINDENT
271 .SS Type: named_arg
272 .sp
273 The \fBnamed_arg\fP defines an alias that can replace multiple options and can define a value for each.
274 .INDENT 0.0
275 .TP
276 .B Keys:
277 .INDENT 7.0
278 .IP \(bu 2
279 \fBtype\fP \- Must have value \fBnamed_arg\fP\&.
280 .IP \(bu 2
281 \fBlong_name\fP \- Name of the alias option.
282 .IP \(bu 2
283 \fBshort_name\fP \- One\-letter shortcut of the name.
284 .IP \(bu 2
285 \fBdescr.<locale>\fP – Description that will be shown in help. \fBdescr.C\fP is used if a description
286 for the appropriate locale is not found. Added in config file version 1.1.
287 .IP \(bu 2
288 \fBdescr\fP – Description that will be shown in help. Deprecated in version 1.1, but remains backward
289 compatible. Does not support locales.
290 .IP \(bu 2
291 \fBhas_value\fP \- Whether the option requires a value. The value is then substituted for \fB${}\fP strings in the
292 values of \fBattached_named_args\fP\&. Default is false.
293 .IP \(bu 2
294 \fBvalue_help.<locale>\fP \- The string shown in help for the value (e.g. \fBCONFIG_FILE_PATH\fP for
295 \fB\-\-config=CONFIG_FILE_PATH\fP). \fBvalue_help.C\fP is used if a string for the appropriate locale is not found.
296 Added in config file version 1.1.
297 .IP \(bu 2
298 \fBvalue_help\fP \- The string shown in help for the value (e.g. \fBCONFIG_FILE_PATH\fP for
299 \fB\-\-config=CONFIG_FILE_PATH\fP). Deprecated in version 1.1, but remains backward compatible.
300 Does not support locales.
301 .IP \(bu 2
302 \fBconst_value\fP \- Default constant value (specified only if the alias does not have a value on the command line).
303 The value is then substituted for \fB${}\fP strings in the values of \fBattached_named_args\fP\&.
304 .IP \(bu 2
305 \fBgroup_id\fP \- A group this alias is part of if any.
306 .IP \(bu 2
307 \fBcomplete\fP \- Whether bash autocompletion should be used for this alias, default is false.
308 .IP \(bu 2
309 \fBattached_named_args\fP \- Options that will be used. The format is an array of inline tables, each of which must
310 contain an \fBid_path\fP key to specify the path to an option, and may contain also a \fBvalue\fP key to specify the
311 value of the option.
312 .UNINDENT
313 .UNINDENT
314 .sp
315 The required keys are \fBtype\fP, and either \fBlong_name\fP or \fBshort_name\fP\&.
316 .INDENT 0.0
317 .TP
318 .B Examples:
319 .INDENT 7.0
320 .IP \(bu 2
321 Alias \fBlist \-\-all\-available\fP for \fBlist \-\-showduplicates \-\-available\fP:
322 .INDENT 2.0
323 .INDENT 3.5
324 .sp
325 .EX
326 [\(aqlist.all\-available\(aq]
327 type = \(aqnamed_arg\(aq
328 long_name = \(aqall\-available\(aq
329 attached_named_args = [
330 { id_path = \(aqlist.showduplicates\(aq },
331 { id_path = \(aqlist.available\(aq }
332 ]
333 .EE
334 .UNINDENT
335 .UNINDENT
336 .IP \(bu 2
337 Alias \fBdownload \-\-dest=DESTDIR\fP for \fBdownload \-\-destdir=DESTDIR\fP:
338 .INDENT 2.0
339 .INDENT 3.5
340 .sp
341 .EX
342 [\(aqdownload.dest\(aq]
343 type = \(aqnamed_arg\(aq
344 long_name = \(aqdest\(aq
345 has_value = true
346 value_help.C = \(aqDESTDIR\(aq
347 attached_named_args = [
348 { id_path = \(aqdownload.destdir\(aq }
349 ]
350 .EE
351 .UNINDENT
352 .UNINDENT
353 .IP \(bu 2
354 Alias \fB\-\-settsflags=TS_FLAGS\fP for \fB\-\-setopt=tsflags=TS_FLAGS\fP:
355 .INDENT 2.0
356 .INDENT 3.5
357 .sp
358 .EX
359 [\(aqsettsflags\(aq]
360 type = \(aqnamed_arg\(aq
361 long_name = \(aqsettsflags\(aq
362 descr.C = \(aqSet transaction flags\(aq
363 descr.cs_CZ = \(aqNastavit parametry transakce\(aq
364 has_value = true
365 value_help.C = \(aqTS_FLAGS\(aq
366 attached_named_args = [
367 { id_path = \(aqsetopt\(aq, value = \(aqtsflags=${}\(aq }
368 ]
369 .EE
370 .UNINDENT
371 .UNINDENT
372 .UNINDENT
373 .UNINDENT
374 .SS Type: group
375 .sp
376 The \fBgroup\fP defines a group for multiple commands or options.
377 .INDENT 0.0
378 .TP
379 .B Required keys:
380 .INDENT 7.0
381 .IP \(bu 2
382 \fBtype\fP \- Must have value \fBgroup\fP\&.
383 .IP \(bu 2
384 \fBheader.<locale>\fP – The header of the group as will be shown in help. \fBheader.C\fP is used if a header
385 for the appropriate locale is not found. Added in config file version 1.1.
386 .IP \(bu 2
387 \fBheader\fP \- The header of the group as will be shown in help. Deprecated in version 1.1, but remains backward
388 compatible. Does not support locales.
389 .UNINDENT
390 .UNINDENT
391 .sp
392 The required keys are \fBtype\fP and \fBheader\fP\&.
393 .sp
394 The aliases are added to the group using the \fBgroup_id\fP key in their respective sections.
395 .INDENT 0.0
396 .TP
397 .B Examples:
398 .INDENT 7.0
399 .IP \(bu 2
400 Group \fBquery\-aliases\fP for subcommand \fBrepo\fP containing aliases \fBrepo.ls\fP and \fBrepo.if\fP:
401 .INDENT 2.0
402 .INDENT 3.5
403 .sp
404 .EX
405 [\(aqrepo.query\-aliases\(aq]
406 type = \(aqgroup\(aq
407 header.C = \(aqQuery Aliases:\(aq
408 header.cs_CZ = \(aqZkratky pro dotazy:\(aq
409
410 [\(aqrepo.ls\(aq]
411 type = \(aqcommand\(aq
412 attached_command = \(aqrepo.list\(aq
413 descr.C = \(dqAlias for \(aqrepo list\(aq\(dq
414 descr.cs_CZ = \(dqAlias pro \(aqrepo list\(aq\(dq
415 group_id = \(aqquery\-aliases\(aq
416
417 [\(aqrepo.if\(aq]
418 type = \(aqcommand\(aq
419 attached_command = \(aqrepo.info\(aq
420 descr.C = \(dqAlias for \(aqrepo info\(aq\(dq
421 descr.cs_CZ = \(dqAlias pro \(aqrepo info\(aq\(dq
422 group_id = \(aqquery\-aliases\(aq
423 .EE
424 .UNINDENT
425 .UNINDENT
426 .UNINDENT
427 .UNINDENT
428 .SH Author
429 See AUTHORS.md in dnf5 source distribution.
430 .SH Copyright
431 Contributors to the dnf5 project.
432 .\" End of generated man page.