mirror of
https://github.com/nix-community/home-manager.git
synced 2025-11-08 19:46:05 +01:00
fish: always run fish_indent
This commit is contained in:
parent
747e36476f
commit
7e81e7ae2b
13 changed files with 19 additions and 57 deletions
|
|
@ -146,14 +146,11 @@ let
|
|||
(mapAttrsToList (k: v: "alias ${k} ${escapeShellArg v}") cfg.shellAliases);
|
||||
|
||||
fishIndent = name: text:
|
||||
if cfg.formatFishScripts then
|
||||
pkgs.runCommand name {
|
||||
nativeBuildInputs = [ cfg.package ];
|
||||
inherit text;
|
||||
passAsFile = [ "text" ];
|
||||
} "fish_indent < $textPath > $out"
|
||||
else
|
||||
pkgs.writeText name text;
|
||||
pkgs.runCommand name {
|
||||
nativeBuildInputs = [ cfg.package ];
|
||||
inherit text;
|
||||
passAsFile = [ "text" ];
|
||||
} "fish_indent < $textPath > $out";
|
||||
|
||||
in {
|
||||
imports = [
|
||||
|
|
@ -288,16 +285,6 @@ in {
|
|||
<link xlink:href="https://fishshell.com/docs/current/cmds/function.html"/>.
|
||||
'';
|
||||
};
|
||||
|
||||
programs.fish.formatFishScripts = mkOption {
|
||||
type = types.bool;
|
||||
default = false;
|
||||
description = ''
|
||||
Whether to process fish configuration and scripts with
|
||||
<literal>fish_indent</literal>.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable (mkMerge [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue