From 2f726bbd1cf383df8d7d658521c880c9104c5412 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Wed, 26 Feb 2020 22:44:54 +0100 Subject: [PATCH] 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. --- modules/programs/bash.nix | 7 ++++++- modules/programs/fish.nix | 10 ++++++---- modules/programs/zsh.nix | 7 ++++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/modules/programs/bash.nix b/modules/programs/bash.nix index 82a9fbe8..5758cbc1 100644 --- a/modules/programs/bash.nix +++ b/modules/programs/bash.nix @@ -82,7 +82,12 @@ in shellAliases = mkOption { default = {}; type = types.attrsOf types.str; - example = { ll = "ls -l"; ".." = "cd .."; }; + example = literalExample '' + { + ll = "ls -l"; + ".." = "cd .."; + } + ''; description = '' An attribute set that maps aliases (the top level attribute names in this option) to command strings or directly to build outputs. diff --git a/modules/programs/fish.nix b/modules/programs/fish.nix index bc8003f3..2c1d5c3e 100644 --- a/modules/programs/fish.nix +++ b/modules/programs/fish.nix @@ -53,10 +53,12 @@ in { shellAliases = mkOption { type = with types; attrsOf str; default = { }; - example = { - ".." = "cd .."; - ll = "ls -l"; - }; + example = literalExample '' + { + ll = "ls -l"; + ".." = "cd .."; + } + ''; description = '' An attribute set that maps aliases (the top level attribute names in this option) to command strings or directly to build outputs. diff --git a/modules/programs/zsh.nix b/modules/programs/zsh.nix index c5694e1f..b6e03a08 100644 --- a/modules/programs/zsh.nix +++ b/modules/programs/zsh.nix @@ -183,7 +183,12 @@ in shellAliases = mkOption { default = {}; - example = { ll = "ls -l"; ".." = "cd .."; }; + example = literalExample '' + { + ll = "ls -l"; + ".." = "cd .."; + } + ''; description = '' An attribute set that maps aliases (the top level attribute names in this option) to command strings or directly to build outputs.