modules/nix-search-tv: add run and shell actions

This commit is contained in:
electria
2026-04-21 13:48:45 -07:00
committed by Austin Horstman
parent ffbd94a1c9
commit 5826802354
2 changed files with 17 additions and 0 deletions

View File

@@ -80,6 +80,15 @@ in
source.command = "${path} print";
preview.command = ''${path} preview "{}"'';
actions.run = {
command = ''nix run {replace:s/\/ /#/g}'';
mode = "fork";
};
actions.shell = {
command = ''nix shell {replace:s/\/ /#/g}'';
mode = "execute";
};
}
);
};

View File

@@ -8,6 +8,14 @@
assertFileExists home-files/.config/television/cable/nix-search-tv.toml
assertFileContent home-files/.config/television/cable/nix-search-tv.toml \
${pkgs.writeText "settings-expected" ''
[actions.run]
command = "nix run {replace:s/\\/ /#/g}"
mode = "fork"
[actions.shell]
command = "nix shell {replace:s/\\/ /#/g}"
mode = "execute"
[metadata]
description = "Search nix options and packages"
name = "nix-search-tv"