mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 07:31:20 +00:00
zsh-autosuggestions: Fix module for 0.5.0
The update for zsh-autosuggestions in #51752 broke the module. This fix reflects the required changes.
This commit is contained in:
parent
ea22830eaf
commit
97ad321e42
|
@ -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)}
|
||||
'';
|
||||
|
|
Loading…
Reference in a new issue