From 076068aa85c8ab8a4786e020a75d2756cb5cd14c Mon Sep 17 00:00:00 2001 From: Noah Masur <7386960+nmasur@users.noreply.github.com> Date: Mon, 4 Jul 2022 23:31:56 -0400 Subject: [PATCH] nix-shell-run shortcut --- modules/shell/fish/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/shell/fish/default.nix b/modules/shell/fish/default.nix index 669a207..be9cba0 100644 --- a/modules/shell/fish/default.nix +++ b/modules/shell/fish/default.nix @@ -42,6 +42,13 @@ body = "pbpaste | jq '.' | pbcopy"; # Need to fix for non-macOS }; ls = { body = "${pkgs.exa}/bin/exa $argv"; }; + nix-shell-run = { + body = '' + set program $argv[1] + commandline -r "nix-shell -p $program --run $program" + commandline -f execute + ''; + }; note = { description = "Edit or create a note"; argumentNames = "filename"; @@ -111,6 +118,7 @@ # Nix ns = "nix-shell -p"; + nsr = "nix-shell-run"; nps = "nix repl ''"; nixo = "man configuration.nix"; nixh = "man home-configuration.nix";