about summary refs log tree commit diff
path: root/pkgs/games
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2020-12-28 10:46:58 +0100
committerProfpatsch <mail@profpatsch.de>2020-12-28 10:54:42 +0100
commita8f1f449657225795af87e0045ec442ce3c82a26 (patch)
treeed34d0037686a3fcb903dcd227455edf8b99bb62 /pkgs/games
parentdad57ac125432a4f699fd258dd5bf2a00e997b55 (diff)
pkgs/profpatsch/e: allow passing a block-style argument as argv
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.
Diffstat (limited to 'pkgs/games')
0 files changed, 0 insertions, 0 deletions