aboutsummaryrefslogtreecommitdiff
path: root/home-manager/modules/programs/z-lua.nix
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2020-02-03 10:05:30 +0100
committerKatharina Fey <kookie@spacekookie.de>2020-02-03 10:05:30 +0100
commitc488527c95c874d3b8743c915173ad7bfb05d5af (patch)
tree2b874dc5606a9dff44096a5e8557f00dc52ac2b6 /home-manager/modules/programs/z-lua.nix
parent899a451e08f7d6d2c8214d119c2a0316849a0ed4 (diff)
parent6cc4fd6ede4909226cb81d3475834251ed1b7210 (diff)
Merge commit '6cc4fd6ede4909226cb81d3475834251ed1b7210'
Diffstat (limited to 'home-manager/modules/programs/z-lua.nix')
-rw-r--r--home-manager/modules/programs/z-lua.nix28
1 files changed, 16 insertions, 12 deletions
diff --git a/home-manager/modules/programs/z-lua.nix b/home-manager/modules/programs/z-lua.nix
index 245eff6a51e..d722ac6a2f0 100644
--- a/home-manager/modules/programs/z-lua.nix
+++ b/home-manager/modules/programs/z-lua.nix
@@ -7,16 +7,14 @@ let
cfg = config.programs.z-lua;
aliases = {
- zz = "z -c"; # restrict matches to subdirs of $PWD
- zi = "z -i"; # cd with interactive selection
- zf = "z -I"; # use fzf to select in multiple matches
- zb = "z -b"; # quickly cd to the parent directory
- zh = "z -I -t ."; # fzf
+ zz = "z -c"; # restrict matches to subdirs of $PWD
+ zi = "z -i"; # cd with interactive selection
+ zf = "z -I"; # use fzf to select in multiple matches
+ zb = "z -b"; # quickly cd to the parent directory
+ zh = "z -I -t ."; # fzf
};
-in
-
-{
+in {
meta.maintainers = [ maintainers.marsam ];
options.programs.z-lua = {
@@ -24,7 +22,7 @@ in
options = mkOption {
type = types.listOf types.str;
- default = [];
+ default = [ ];
example = [ "enhanced" "once" "fzf" ];
description = ''
List of options to pass to z.lua.
@@ -68,15 +66,21 @@ in
home.packages = [ pkgs.z-lua ];
programs.bash.initExtra = mkIf cfg.enableBashIntegration ''
- eval "$(${pkgs.z-lua}/bin/z --init bash ${concatStringsSep " " cfg.options})"
+ eval "$(${pkgs.z-lua}/bin/z --init bash ${
+ concatStringsSep " " cfg.options
+ })"
'';
programs.zsh.initExtra = mkIf cfg.enableZshIntegration ''
- eval "$(${pkgs.z-lua}/bin/z --init zsh ${concatStringsSep " " cfg.options})"
+ eval "$(${pkgs.z-lua}/bin/z --init zsh ${
+ concatStringsSep " " cfg.options
+ })"
'';
programs.fish.shellInit = mkIf cfg.enableFishIntegration ''
- source (${pkgs.z-lua}/bin/z --init fish ${concatStringsSep " " cfg.options} | psub)
+ source (${pkgs.z-lua}/bin/z --init fish ${
+ concatStringsSep " " cfg.options
+ } | psub)
'';
programs.bash.shellAliases = mkIf cfg.enableAliases aliases;