mirror of https://git.jolheiser.com/dotnix.git
parent
20e4aee614
commit
f6f5a759e1
|
@ -69,6 +69,18 @@ def gomodsri [] {
|
||||||
echo 'nixpkgs.lib.fileContents ./go.mod.sri'
|
echo 'nixpkgs.lib.fileContents ./go.mod.sri'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Run a command if known, otherwise run it with nix
|
||||||
|
def , [
|
||||||
|
cmd: string # The command to run
|
||||||
|
...args: string # Command arguments; all flags MUST be quoted
|
||||||
|
] {
|
||||||
|
if (not (which $cmd | is-empty)) {
|
||||||
|
^$cmd ...$args
|
||||||
|
return
|
||||||
|
}
|
||||||
|
^nix run $"nixpkgs#($cmd)" -- ...$args
|
||||||
|
}
|
||||||
|
|
||||||
## Other ##
|
## Other ##
|
||||||
$env.EDITOR = hx
|
$env.EDITOR = hx
|
||||||
$env.config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))
|
$env.config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))
|
||||||
|
|
Loading…
Reference in New Issue