.\" Man page generated from reStructuredText .\" by the Docutils 0.23 manpage writer. . . .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" "Sep 06, 2026" "" "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 loaded 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 The configuration file must begin with the \fBversion\fP attribute set to a required version, for example: .INDENT 0.0 .INDENT 3.5 .sp .EX version = \(aq1.1\(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.C = \(dqAlias for \(aqinstall\(aq\(dq descr.cs_CZ = \(dqAlias pro \(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 command .IP \(bu 2 cloned_named_arg .IP \(bu 2 named_arg .IP \(bu 2 group .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. \fBdescr.C\fP is used if a description for the appropriate locale is not found. Added in config file version 1.1. .IP \(bu 2 \fBdescr\fP – Description that will be shown in help. Deprecated in version 1.1, but remains backward compatible. Does not support locales. .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 \fBrequired_values\fP \- Values (positional arguments) consumed by the command alias. The format is an array of tables; each must include either \fIvalue_help.\fP for the active locale or \fIvalue_help.C\fP, and may optionally include \fIdescr.\fP\&. The default is an empty array. Added in config file version 1.1. .IP \(bu 2 \fBattached_named_args\fP \- Options that will be used with the command. The format is an array of 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. The \fBvalue\fP can contain \fB${index}\fP placeholders, which are replaced by values consumed by the command alias (as defined by \fBrequired_values\fP). Command arguments start at index 1. Index 0 refers to the command alias itself. If no \fBvalue\fP key is provided, an empty string will be passed to named arguments that expect a value. .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.C = \(dqAlias for \(aqgroup list\(aq\(dq descr.cs_CZ = \(dqAlias pro \(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.C = \(dqAlias for \(aqgroup list\(aq\(dq descr.cs_CZ = \(dqAlias pro \(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.C = \(dqAlias for \(aq\-\-repo=fedora list \-\-showduplicates\(aq\(dq descr.cs_CZ = \(dqAlias pro \(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 .IP \(bu 2 Alias \fBwhatrequires\fP for \fBrepoquery \-\-installed \-\-whatrequires=\fP: .INDENT 2.0 .INDENT 3.5 .sp .EX [\(aqwhatrequires\(aq] type = \(aqcommand\(aq attached_command = \(aqrepoquery\(aq descr = \(aqAlias for \(dqrepoquery \-\-installed \-\-whatrequires=\(dq\(aq complete = true [[whatrequires.required_values]] value_help.C = \(aqCAPABILITY,...\(aq descr.C = \(aqLimit to packages that require any of .\(aq descr.cs_CZ = \(aqOmezí se na balíčky vyžadující něco z .\(aq [[whatrequires.attached_named_args]] id_path = \(aqrepoquery.installed\(aq [[whatrequires.attached_named_args]] id_path = \(aqrepoquery.whatrequires\(aq value=\(aq${1}\(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. \fBdescr.C\fP is used if a description for the appropriate locale is not found. Added in config file version 1.1. .IP \(bu 2 \fBdescr\fP – Description that will be shown in help. Deprecated in version 1.1, but remains backward compatible. Does not support locales. .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). \fBvalue_help.C\fP is used if a string for the appropriate locale is not found. Added in config file version 1.1. .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). Deprecated in version 1.1, but remains backward compatible. Does not support locales. .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.C = \(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.C = \(aqSet transaction flags\(aq descr.cs_CZ = \(aqNastavit parametry transakce\(aq has_value = true value_help.C = \(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. \fBheader.C\fP is used if a header for the appropriate locale is not found. Added in config file version 1.1. .IP \(bu 2 \fBheader\fP \- The header of the group as will be shown in help. Deprecated in version 1.1, but remains backward compatible. Does not support locales. .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.C = \(aqQuery Aliases:\(aq header.cs_CZ = \(aqZkratky pro dotazy:\(aq [\(aqrepo.ls\(aq] type = \(aqcommand\(aq attached_command = \(aqrepo.list\(aq descr.C = \(dqAlias for \(aqrepo list\(aq\(dq descr.cs_CZ = \(dqAlias pro \(aqrepo list\(aq\(dq group_id = \(aqquery\-aliases\(aq [\(aqrepo.if\(aq] type = \(aqcommand\(aq attached_command = \(aqrepo.info\(aq descr.C = \(dqAlias for \(aqrepo info\(aq\(dq descr.cs_CZ = \(dqAlias pro \(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. .\" End of generated man page.