fzfmenu: make --print-query configurable
This commit is contained in:
parent
3197b9a930
commit
aa019f372e
@ -14,13 +14,17 @@ let
|
|||||||
_file = toString ./profile.nix;
|
_file = toString ./profile.nix;
|
||||||
imports = singleton config;
|
imports = singleton config;
|
||||||
options = {
|
options = {
|
||||||
|
appName = mkOption {
|
||||||
|
default = "fzfmenu";
|
||||||
|
type = types.label;
|
||||||
|
};
|
||||||
defaultPrompt = mkOption {
|
defaultPrompt = mkOption {
|
||||||
default = ">";
|
default = ">";
|
||||||
type = types.str;
|
type = types.str;
|
||||||
};
|
};
|
||||||
appName = mkOption {
|
printQuery = mkOption {
|
||||||
default = "fzfmenu";
|
default = true;
|
||||||
type = types.label;
|
type = types.bool;
|
||||||
};
|
};
|
||||||
windowTitle = mkOption {
|
windowTitle = mkOption {
|
||||||
default = "fzfmenu";
|
default = "fzfmenu";
|
||||||
@ -82,9 +86,8 @@ pkgs.writeDashBin "fzfmenu" ''
|
|||||||
|
|
||||||
${pkgs.fzf}/bin/fzf \
|
${pkgs.fzf}/bin/fzf \
|
||||||
--history=/dev/null \
|
--history=/dev/null \
|
||||||
--print-query \
|
|
||||||
--prompt="$PROMPT" \
|
--prompt="$PROMPT" \
|
||||||
--reverse \
|
--reverse \
|
||||||
|
|
${optionalString cfg.printQuery "--print-query"} \
|
||||||
${pkgs.coreutils}/bin/tail -1
|
${optionalString cfg.printQuery "| ${pkgs.coreutils}/bin/tail -1"}
|
||||||
''
|
''
|
||||||
|
Loading…
Reference in New Issue
Block a user