bash, fish, zsh: fix shellAliases example

Unfortunately the document generator is not smart enough to quote the
`..` alias in the documentation which is very misleading. By making it
a literal example the quotes stay.
This commit is contained in:
Robert Helgesson 2020-02-26 22:44:54 +01:00
parent 02d6040003
commit 2f726bbd1c
No known key found for this signature in database
GPG key ID: 36BDAA14C2797E89
3 changed files with 18 additions and 6 deletions

View file

@ -82,7 +82,12 @@ in
shellAliases = mkOption { shellAliases = mkOption {
default = {}; default = {};
type = types.attrsOf types.str; type = types.attrsOf types.str;
example = { ll = "ls -l"; ".." = "cd .."; }; example = literalExample ''
{
ll = "ls -l";
".." = "cd ..";
}
'';
description = '' description = ''
An attribute set that maps aliases (the top level attribute names in An attribute set that maps aliases (the top level attribute names in
this option) to command strings or directly to build outputs. this option) to command strings or directly to build outputs.

View file

@ -53,10 +53,12 @@ in {
shellAliases = mkOption { shellAliases = mkOption {
type = with types; attrsOf str; type = with types; attrsOf str;
default = { }; default = { };
example = { example = literalExample ''
".." = "cd .."; {
ll = "ls -l"; ll = "ls -l";
}; ".." = "cd ..";
}
'';
description = '' description = ''
An attribute set that maps aliases (the top level attribute names An attribute set that maps aliases (the top level attribute names
in this option) to command strings or directly to build outputs. in this option) to command strings or directly to build outputs.

View file

@ -183,7 +183,12 @@ in
shellAliases = mkOption { shellAliases = mkOption {
default = {}; default = {};
example = { ll = "ls -l"; ".." = "cd .."; }; example = literalExample ''
{
ll = "ls -l";
".." = "cd ..";
}
'';
description = '' description = ''
An attribute set that maps aliases (the top level attribute names in An attribute set that maps aliases (the top level attribute names in
this option) to command strings or directly to build outputs. this option) to command strings or directly to build outputs.