jolheiser revised this gist . Go to revision
No changes
jolheiser revised this gist . Go to revision
1 file changed, 8 insertions
comma.nu(file created)
@@ -0,0 +1,8 @@ | |||
1 | + | # Run a command if known, otherwise run it with nix | |
2 | + | def , [cmd: string, ...args: string] { | |
3 | + | if (not (which $cmd | is-empty)) { | |
4 | + | ^$cmd ...$args | |
5 | + | return | |
6 | + | } | |
7 | + | ^nix run $"nixpkgs#($cmd)" -- ...$args | |
8 | + | } |
Newer
Older