From 97ad321e4268caf803f81492c6914daf3029d533 Mon Sep 17 00:00:00 2001 From: Tim Steinbach Date: Mon, 10 Dec 2018 10:10:19 -0500 Subject: [PATCH] zsh-autosuggestions: Fix module for 0.5.0 The update for zsh-autosuggestions in #51752 broke the module. This fix reflects the required changes. --- nixos/modules/programs/zsh/zsh-autosuggestions.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nixos/modules/programs/zsh/zsh-autosuggestions.nix b/nixos/modules/programs/zsh/zsh-autosuggestions.nix index 416f4c9c675..ded17f38a61 100644 --- a/nixos/modules/programs/zsh/zsh-autosuggestions.nix +++ b/nixos/modules/programs/zsh/zsh-autosuggestions.nix @@ -18,13 +18,13 @@ in }; strategy = mkOption { - type = types.enum [ "default" "match_prev_cmd" ]; - default = "default"; + type = types.enum [ "history" "match_prev_cmd" ]; + default = "history"; description = '' Set ZSH_AUTOSUGGEST_STRATEGY to choose the strategy for generating suggestions. There are currently two to choose from: - * default: Chooses the most recent match. + * history: Chooses the most recent match. * match_prev_cmd: Chooses the most recent match whose preceding history item matches the most recently executed command (more info). Note that this strategy won't work as expected with ZSH options that don't preserve the history order such as @@ -51,7 +51,7 @@ in source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="${cfg.highlightStyle}" - export ZSH_AUTOSUGGEST_STRATEGY="${cfg.strategy}" + export ZSH_AUTOSUGGEST_STRATEGY=("${cfg.strategy}") ${concatStringsSep "\n" (mapAttrsToList (key: value: ''export ${key}="${value}"'') cfg.extraConfig)} '';