.\" Man page generated from reStructuredText. . . .nr rst2man-indent-level 0 . .de1 rstReportMargin \\$1 \\n[an-margin] level \\n[rst2man-indent-level] level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] - \\n[rst2man-indent0] \\n[rst2man-indent1] \\n[rst2man-indent2] .. .de1 INDENT .\" .rstReportMargin pre: . RS \\$1 . nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] . nr rst2man-indent-level +1 .\" .rstReportMargin post: .. .de UNINDENT . RE .\" indent \\n[an-margin] .\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] .nr rst2man-indent-level -1 .\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] .in \\n[rst2man-indent\\n[rst2man-indent-level]]u .. .TH "DNF5-ALIASES" "7" "Apr 18, 2025" "" "dnf5" .SH NAME dnf5-aliases \- Aliases for command line arguments .SH DESCRIPTION .sp It is possible to define custom aliases which can be then used as dnf commands or options to abbreviate longer command and option sequences. .sp The aliases can be configured in the toml format and the configuration files are taken from these drop\-in directories: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fB/usr/share/dnf5/aliases.d/\fP .IP \(bu 2 \fB/etc/dnf/dnf5\-aliases.d/\fP .IP \(bu 2 \fB$XDG_CONFIG_HOME/dnf5/aliases.d/\fP .UNINDENT .UNINDENT .UNINDENT .SS Syntax: .sp Configuration file must begin with the attribute \fBversion\fP with a value of a supported version, for example: .INDENT 0.0 .INDENT 3.5 .sp .EX version = \(aq1.0\(aq .EE .UNINDENT .UNINDENT .sp Each alias is defined in a separate section, using \fBkey = value\fP pairs, for example: .INDENT 0.0 .INDENT 3.5 .sp .EX [\(aqin\(aq] type = \(aqcommand\(aq attached_command = \(aqinstall\(aq descr = \(dqAlias for \(aqinstall\(aq\(dq .EE .UNINDENT .UNINDENT .sp The section name uniquely identifies the alias. It is in a form of a path, i.e. one or more strings separated by dots, which defines the scope of the alias. For example, string \(dqgroup.list.in\(dq would identify an alias usable only within the scope of the group list subcommand. .sp There are the following types of aliases: .INDENT 0.0 .INDENT 3.5 .INDENT 0.0 .IP \(bu 2 \fI\%command\fP .IP \(bu 2 \fI\%cloned_named_arg\fP .IP \(bu 2 \fI\%named_arg\fP .IP \(bu 2 \fI\%group\fP .UNINDENT .UNINDENT .UNINDENT .SS Type: command .sp The \fBcommand\fP alias defines an alias for a command. .INDENT 0.0 .TP .B Keys: .INDENT 7.0 .IP \(bu 2 \fBtype\fP \- Must have value \fBcommand\fP\&. .IP \(bu 2 \fBattached_command\fP \- Path to a command for which this alias is defined. .IP \(bu 2 \fBdescr\fP \- Description that will be shown in help. .IP \(bu 2 \fBgroup_id\fP \- A group this alias is part of if any. .IP \(bu 2 \fBcomplete\fP \- Whether bash autocompletion should be used for this alias, default is false. .IP \(bu 2 \fBattached_named_args\fP \- Options that will be used with the command. The format is an array of inline tables, each of which must contain an \fBid_path\fP key to specify the path to an option, and may contain also a \fBvalue\fP key to specify the value of the option. .UNINDENT .UNINDENT .sp The required keys are \fBtype\fP, and \fBattached_command\fP\&. .INDENT 0.0 .TP .B Examples: .INDENT 7.0 .IP \(bu 2 Alias \fBgrouplist\fP for \fBgroup list\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqgrouplist\(aq] type = \(aqcommand\(aq attached_command = \(aqgroup.list\(aq descr = \(dqAlias for \(aqgroup list\(aq\(dq .EE .UNINDENT .UNINDENT .IP \(bu 2 Alias \fBgroup.ls\fP for \fBgroup list\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqgroup.ls\(aq] type = \(aqcommand\(aq attached_command = \(aqgroup.list\(aq descr = \(dqAlias for \(aqgroup list\(aq\(dq complete = true .EE .UNINDENT .UNINDENT .IP \(bu 2 Alias \fBlist\-fedora\-all\fP for \fB\-\-repo=fedora list \-\-showduplicates\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqlist\-fedora\-all\(aq] type = \(aqcommand\(aq attached_command = \(aqlist\(aq descr = \(dqAlias for \(aq\-\-repo=fedora list \-\-showduplicates\(aq\(dq complete = true attached_named_args = [ { id_path = \(aqrepo\(aq, value = \(aqfedora\(aq }, { id_path = \(aqlist.showduplicates\(aq } ] .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SS Type: cloned_named_arg .sp The \fBcloned_named_arg\fP alias defines another name for a given option. .INDENT 0.0 .TP .B Keys: .INDENT 7.0 .IP \(bu 2 \fBtype\fP \- Must have value \fBcloned_named_arg\fP\&. .IP \(bu 2 \fBlong_name\fP \- Name of the alias option. .IP \(bu 2 \fBshort_name\fP \- One\-letter shortcut of the name. .IP \(bu 2 \fBsource\fP \- Path to the option for which this alias is defined. .IP \(bu 2 \fBgroup_id\fP \- A group this alias is part of if any. .IP \(bu 2 \fBcomplete\fP \- Whether bash autocompletion should be used for this alias, default is false. .UNINDENT .UNINDENT .sp The required keys are \fBtype\fP, either \fBlong_name\fP or \fBshort_name\fP, and \fBsource\fP\&. .INDENT 0.0 .TP .B Examples: .INDENT 7.0 .IP \(bu 2 Alias \fB\-\-nobest\fP for \fB\-\-no\-best\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqnobest\(aq] type = \(aqcloned_named_arg\(aq long_name = \(aqnobest\(aq source = \(aqno\-best\(aq .EE .UNINDENT .UNINDENT .IP \(bu 2 Alias \fBrepoquery \-\-list\fP or \fBrepoquery \-l\fP for \fBrepoquery \-\-files\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqrepoquery.list\(aq] type = \(aqcloned_named_arg\(aq long_name = \(aqlist\(aq short_name = \(aql\(aq source = \(aqrepoquery.files\(aq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SS Type: named_arg .sp The \fBnamed_arg\fP defines an alias that can replace multiple options and can define a value for each. .INDENT 0.0 .TP .B Keys: .INDENT 7.0 .IP \(bu 2 \fBtype\fP \- Must have value \fBnamed_arg\fP\&. .IP \(bu 2 \fBlong_name\fP \- Name of the alias option. .IP \(bu 2 \fBshort_name\fP \- One\-letter shortcut of the name. .IP \(bu 2 \fBdescr\fP \- Description that will be shown in help. .IP \(bu 2 \fBhas_value\fP \- Whether the option requires a value. The value is then substituted for \fB${}\fP strings in the values of \fBattached_named_args\fP\&. Default is false. .IP \(bu 2 \fBvalue_help\fP \- The string shown in help for the value (e.g. \fBCONFIG_FILE_PATH\fP for \fB\-\-config=CONFIG_FILE_PATH\fP). .IP \(bu 2 \fBconst_value\fP \- Default constant value (specified only if the alias does not have a value on the command line). The value is then substituted for \fB${}\fP strings in the values of \fBattached_named_args\fP\&. .IP \(bu 2 \fBgroup_id\fP \- A group this alias is part of if any. .IP \(bu 2 \fBcomplete\fP \- Whether bash autocompletion should be used for this alias, default is false. .IP \(bu 2 \fBattached_named_args\fP \- Options that will be used. The format is an array of inline tables, each of which must contain an \fBid_path\fP key to specify the path to an option, and may contain also a \fBvalue\fP key to specify the value of the option. .UNINDENT .UNINDENT .sp The required keys are \fBtype\fP, and either \fBlong_name\fP or \fBshort_name\fP\&. .INDENT 0.0 .TP .B Examples: .INDENT 7.0 .IP \(bu 2 Alias \fBlist \-\-all\-available\fP for \fBlist \-\-showduplicates \-\-available\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqlist.all\-available\(aq] type = \(aqnamed_arg\(aq long_name = \(aqall\-available\(aq attached_named_args = [ { id_path = \(aqlist.showduplicates\(aq }, { id_path = \(aqlist.available\(aq } ] .EE .UNINDENT .UNINDENT .IP \(bu 2 Alias \fBdownload \-\-dest=DESTDIR\fP for \fBdownload \-\-destdir=DESTDIR\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqdownload.dest\(aq] type = \(aqnamed_arg\(aq long_name = \(aqdest\(aq has_value = true value_help = \(aqDESTDIR\(aq attached_named_args = [ { id_path = \(aqdownload.destdir\(aq } ] .EE .UNINDENT .UNINDENT .IP \(bu 2 Alias \fB\-\-settsflags=TS_FLAGS\fP for \fB\-\-setopt=tsflags=TS_FLAGS\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqsettsflags\(aq] type = \(aqnamed_arg\(aq long_name = \(aqsettsflags\(aq descr = \(aqSet transaction flags\(aq has_value = true value_help = \(aqTS_FLAGS\(aq attached_named_args = [ { id_path = \(aqsetopt\(aq, value = \(aqtsflags=${}\(aq } ] .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SS Type: group .sp The \fBgroup\fP defines a group for multiple commands or options. .INDENT 0.0 .TP .B Required keys: .INDENT 7.0 .IP \(bu 2 \fBtype\fP \- Must have value \fBgroup\fP\&. .IP \(bu 2 \fBheader\fP \- The header of the group as will be shown in help. .UNINDENT .UNINDENT .sp The required keys are \fBtype\fP and \fBheader\fP\&. .sp The aliases are added to the group using the \fBgroup_id\fP key in their respective sections. .INDENT 0.0 .TP .B Examples: .INDENT 7.0 .IP \(bu 2 Group \fBquery\-aliases\fP for subcommand \fBrepo\fP containing aliases \fBrepo.ls\fP and \fBrepo.if\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqrepo.query\-aliases\(aq] type = \(aqgroup\(aq header = \(aqQuery Aliases:\(aq [\(aqrepo.ls\(aq] type = \(aqcommand\(aq attached_command = \(aqrepo.list\(aq descr = \(dqAlias for \(aqrepo list\(aq\(dq group_id = \(aqquery\-aliases\(aq [\(aqrepo.if\(aq] type = \(aqcommand\(aq attached_command = \(aqrepo.info\(aq descr = \(dqAlias for \(aqrepo info\(aq\(dq group_id = \(aqquery\-aliases\(aq .EE .UNINDENT .UNINDENT .UNINDENT .UNINDENT .SH AUTHOR See AUTHORS.md in dnf5 source distribution. .SH COPYRIGHT Contributors to the dnf5 project. .\" Generated by docutils manpage writer. .