fzfmenu: make --print-query configurable
This commit is contained in:
parent
3197b9a930
commit
aa019f372e
@ -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"}
|
||||
''
|
||||
|
Loading…
Reference in New Issue
Block a user