From 3c3510e61ca5c15a0f13d73c2232fa2d5478a86c Mon Sep 17 00:00:00 2001 From: Poseidon Date: Tue, 19 Aug 2025 14:40:42 -0500 Subject: [PATCH] programs/nix-search-tv: add quotes Add quotes to the preview command to prevent the shell from interpreting options with `` as writing the output of the command name to a file with the name of the remainder of the option name. --- modules/programs/nix-search-tv.nix | 2 +- tests/modules/programs/nix-search-tv/television.nix | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/programs/nix-search-tv.nix b/modules/programs/nix-search-tv.nix index 3aaf954ea..70153a8d3 100644 --- a/modules/programs/nix-search-tv.nix +++ b/modules/programs/nix-search-tv.nix @@ -72,7 +72,7 @@ in }; source.command = "${path} print"; - preview.command = "${path} preview {}"; + preview.command = ''${path} preview "{}"''; } ); diff --git a/tests/modules/programs/nix-search-tv/television.nix b/tests/modules/programs/nix-search-tv/television.nix index 5f12cba96..da0566aff 100644 --- a/tests/modules/programs/nix-search-tv/television.nix +++ b/tests/modules/programs/nix-search-tv/television.nix @@ -13,7 +13,7 @@ name = "nix-search-tv" [preview] - command = "${lib.getExe pkgs.nix-search-tv} preview {}" + command = "${lib.getExe pkgs.nix-search-tv} preview \"{}\"" [source] command = "${lib.getExe pkgs.nix-search-tv} print"