summaryrefslogtreecommitdiffstats
path: root/krebs/5pkgs/simple/fzfmenu/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'krebs/5pkgs/simple/fzfmenu/default.nix')
-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"}
''