summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/fzfmenu
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2020-06-16 21:38:24 +0200
committertv <tv@krebsco.de>2020-06-16 21:40:20 +0200
commitaa019f372e603fa74469c9483481ea15623d7a7e (patch)
treeef080a5ded56cb5d24154dfe1276dd4b5d0eab6b /krebs/5pkgs/simple/fzfmenu
parent3197b9a93007cda073df939c40131fda15415a64 (diff)
fzfmenu: make --print-query configurable
Diffstat (limited to 'krebs/5pkgs/simple/fzfmenu')
-rw-r--r--krebs/5pkgs/simple/fzfmenu/default.nix15
1 files changed, 9 insertions, 6 deletions
diff --git a/krebs/5pkgs/simple/fzfmenu/default.nix b/krebs/5pkgs/simple/fzfmenu/default.nix
index 04e53899b..4c7784b4f 100644
--- a/krebs/5pkgs/simple/fzfmenu/default.nix
+++ b/krebs/5pkgs/simple/fzfmenu/default.nix
@@ -14,13 +14,17 @@ let
_file = toString ./profile.nix;
imports = singleton config;
options = {
+ appName = mkOption {
+ default = "fzfmenu";
+ type = types.label;
+ };
defaultPrompt = mkOption {
default = ">";
type = types.str;
};
- appName = mkOption {
- default = "fzfmenu";
- type = types.label;
+ printQuery = mkOption {
+ default = true;
+ type = types.bool;
};
windowTitle = mkOption {
default = "fzfmenu";
@@ -82,9 +86,8 @@ pkgs.writeDashBin "fzfmenu" ''
${pkgs.fzf}/bin/fzf \
--history=/dev/null \
- --print-query \
--prompt="$PROMPT" \
--reverse \
- |
- ${pkgs.coreutils}/bin/tail -1
+ ${optionalString cfg.printQuery "--print-query"} \
+ ${optionalString cfg.printQuery "| ${pkgs.coreutils}/bin/tail -1"}
''