From e44bf17530ab27c69a67c87dd9b8ac6322011cc6 Mon Sep 17 00:00:00 2001 From: outremonde Date: Tue, 10 Jun 2025 22:11:50 -0400 Subject: added qr command to nushell added a quick nushell command to quickly run a nix package. Former-commit-id: 7eb552449056ed3abb0305bde093a78efd477192 --- features/user/cli/shells/nushell/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'features/user/cli/shells/nushell/default.nix') diff --git a/features/user/cli/shells/nushell/default.nix b/features/user/cli/shells/nushell/default.nix index 7df34e8..9d7807f 100644 --- a/features/user/cli/shells/nushell/default.nix +++ b/features/user/cli/shells/nushell/default.nix @@ -68,10 +68,10 @@ in { direnv allow } - # Quicker nix shells. + # Quickly create a nix shell. def qs [...pkgs] { if $pkgs == [] { - print "Please use a package name" + print "Please use a package name." return } let pkgs_string = $pkgs @@ -80,6 +80,15 @@ in { | str trim nu -c $"nix shell ($pkgs_string)" } + + # Quickly run a nix package. + def qr [pkg: string] { + if $pkg == null { + print "Please use a package name." + return + } + nix run $"nixpkgs#($pkg)" + } ''; }; programs.zoxide.enable = true; -- cgit v1.2.3