summaryrefslogtreecommitdiff
path: root/features/user/cli
diff options
context:
space:
mode:
authoroutremonde <outremonde@vivaldi.net>2025-06-10 22:11:50 -0400
committeroutremonde <outremonde@vivaldi.net>2025-06-10 22:11:50 -0400
commite44bf17530ab27c69a67c87dd9b8ac6322011cc6 (patch)
treefe7250d4e63b3f86ff9573ede69968398e2bf3db /features/user/cli
parent0eefdac0f88a909097c618ee2c30b1e4028e78e3 (diff)
added qr command to nushell
added a quick nushell command to quickly run a nix package. Former-commit-id: 7eb552449056ed3abb0305bde093a78efd477192
Diffstat (limited to 'features/user/cli')
-rw-r--r--features/user/cli/shells/nushell/default.nix13
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;