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 | } |
9 |
Last active
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 | } |
9 |