From a8f1f449657225795af87e0045ec442ce3c82a26 Mon Sep 17 00:00:00 2001 From: Profpatsch Date: Mon, 28 Dec 2020 10:46:58 +0100 Subject: pkgs/profpatsch/e: allow passing a block-style argument as argv MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Often times I want to execute “block-style” programs directly, but it is rather inconvenient to type out `execlineb -c "…"` every time, plus -c wants the argv as a single string instead of an argv. The alternative, using the block representation with leading spaces, is even less ergonomic. So instead of execlineb -c "nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello" or even nix-run ' -A' ' pkgs.profpatsch.e' ' /home/me/vuizvui' '' echo hello I can now write e nix-run { -A pkgs.profpatsch.e ~/vuizvui } echo hello and it will work as expected (provided your shell expands inside {} blocks, which bash does but fish doesn’t for some reason). If no argument is passed, e falls back to opening a shell prompt. --- machines/profpatsch/shiki.nix | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'machines') diff --git a/machines/profpatsch/shiki.nix b/machines/profpatsch/shiki.nix index e2b563f5..3fc11089 100644 --- a/machines/profpatsch/shiki.nix +++ b/machines/profpatsch/shiki.nix @@ -255,6 +255,10 @@ in { (texlive.combine { inherit (texlive) scheme-small pdfjam; }) # move script/nix-cache-binary to here cdb + (pkgs.vuizvui.profpatsch.binify { + exe = pkgs.vuizvui.profpatsch.e; + name = "e"; + }) myPkgs.zoomboxed ]; in systemPkgs ++ xPkgs ++ guiPkgs -- cgit 1.4.1