From 0d1ca254d0f213a118459c5be8ae465018132f74 Mon Sep 17 00:00:00 2001 From: Robert Helgesson Date: Sun, 2 Feb 2020 00:58:06 +0100 Subject: [PATCH] readline: fix example (cherry picked from commit a4a07ba996cc74e58aa22772ad69b50670c8b24f) --- modules/programs/readline.nix | 4 +++- tests/modules/programs/readline/using-all-options.nix | 4 +--- tests/modules/programs/readline/using-all-options.txt | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/modules/programs/readline.nix b/modules/programs/readline.nix index 35cbab5f5..bba9f209b 100644 --- a/modules/programs/readline.nix +++ b/modules/programs/readline.nix @@ -28,7 +28,9 @@ in bindings = mkOption { default = {}; type = types.attrsOf types.str; - example = { "\C-h" = "backward-kill-word"; }; + example = literalExample '' + { "\\C-h" = "backward-kill-word"; } + ''; description = "Readline bindings."; }; diff --git a/tests/modules/programs/readline/using-all-options.nix b/tests/modules/programs/readline/using-all-options.nix index f50117679..ab851020c 100644 --- a/tests/modules/programs/readline/using-all-options.nix +++ b/tests/modules/programs/readline/using-all-options.nix @@ -7,9 +7,7 @@ with lib; programs.readline = { enable = true; - bindings = { - "\C-h" = "backward-kill-word"; - }; + bindings = { "\\C-h" = "backward-kill-word"; }; variables = { bell-style = "audible"; diff --git a/tests/modules/programs/readline/using-all-options.txt b/tests/modules/programs/readline/using-all-options.txt index da9f7df68..6b4aef51e 100644 --- a/tests/modules/programs/readline/using-all-options.txt +++ b/tests/modules/programs/readline/using-all-options.txt @@ -4,7 +4,7 @@ $include /etc/inputrc set bell-style audible set completion-map-case on set completion-prefix-display-length 2 -"C-h": backward-kill-word +"\C-h": backward-kill-word $if mode=emacs "\e[1~": beginning-of-line $endif