diff options
Diffstat (limited to 'features/user')
| -rw-r--r-- | features/user/cli/shells/nushell/default.nix | 13 |
1 files changed, 11 insertions, 2 deletions
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; |
