feat: comma

Signed-off-by: jolheiser <john.olheiser@gmail.com>
teamcity
jolheiser 2024-03-20 12:57:56 -05:00
parent 20e4aee614
commit f6f5a759e1
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 12 additions and 0 deletions

View File

@ -69,6 +69,18 @@ def gomodsri [] {
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 ##
$env.EDITOR = hx
$env.config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))