Debian Codegraph @

upstream/mageia-cauldron/man7/dnf5-aliases.7

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