-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #298692 from SebTM/auto-update/fzf
fzf: 0.47.0 -> 0.48.1
- Loading branch information
Showing
5 changed files
with
41 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,46 @@ | ||
{ pkgs, config, lib, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
cfg = config.programs.fzf; | ||
|
||
in | ||
{ | ||
imports = [ | ||
(lib.mkRemovedOptionModule [ "programs" "fzf" "keybindings" ] '' | ||
Use "programs.fzf.enabled" instead, due to fzf upstream-change it's not possible to load shell-completion and keybindings separately. | ||
If you want to change/disable certain keybindings please check the fzf-documentation. | ||
'') | ||
(lib.mkRemovedOptionModule [ "programs" "fzf" "fuzzyCompletion" ] '' | ||
Use "programs.fzf.enabled" instead, due to fzf upstream-change it's not possible to load shell-completion and keybindings separately. | ||
If you want to change/disable certain keybindings please check the fzf-documentation. | ||
'') | ||
]; | ||
|
||
options = { | ||
programs.fzf = { | ||
fuzzyCompletion = mkEnableOption (mdDoc "fuzzy completion with fzf"); | ||
keybindings = mkEnableOption (mdDoc "fzf keybindings"); | ||
}; | ||
programs.fzf.enable = mkEnableOption (mdDoc "fuzzy completion with fzf and keybindings"); | ||
}; | ||
config = { | ||
environment.systemPackages = optional (cfg.keybindings || cfg.fuzzyCompletion) pkgs.fzf; | ||
|
||
programs.bash.interactiveShellInit = optionalString cfg.fuzzyCompletion '' | ||
source ${pkgs.fzf}/share/fzf/completion.bash | ||
'' + optionalString cfg.keybindings '' | ||
source ${pkgs.fzf}/share/fzf/key-bindings.bash | ||
config = mkIf cfg.enable { | ||
environment.systemPackages = [ pkgs.fzf ]; | ||
|
||
programs.bash.interactiveShellInit = '' | ||
eval "$(${getExe pkgs.fzf} --bash)" | ||
''; | ||
|
||
programs.fish.interactiveShellInit = '' | ||
${getExe pkgs.fzf} --fish | source | ||
''; | ||
|
||
programs.zsh.interactiveShellInit = optionalString (!config.programs.zsh.ohMyZsh.enable) | ||
(optionalString cfg.fuzzyCompletion '' | ||
source ${pkgs.fzf}/share/fzf/completion.zsh | ||
'' + optionalString cfg.keybindings '' | ||
source ${pkgs.fzf}/share/fzf/key-bindings.zsh | ||
''); | ||
programs.zsh = { | ||
interactiveShellInit = optionalString (!config.programs.zsh.ohMyZsh.enable) '' | ||
eval "$(${getExe pkgs.fzf} --zsh)" | ||
''; | ||
|
||
programs.zsh.ohMyZsh.plugins = lib.mkIf (cfg.keybindings || cfg.fuzzyCompletion) [ "fzf" ]; | ||
ohMyZsh.plugins = mkIf (config.programs.zsh.ohMyZsh.enable) [ "fzf" ]; | ||
}; | ||
}; | ||
|
||
meta.maintainers = with maintainers; [ laalsaas ]; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters