2023-06-28 20:48:01 +00:00
|
|
|
## Aliases ##
|
|
|
|
alias cat = bat
|
|
|
|
alias find = fd
|
|
|
|
alias df = duf
|
|
|
|
alias du = dust -b -d 1
|
|
|
|
alias just = just --shell "nu" --shell-arg "-c"
|
|
|
|
alias ll = ls -al
|
|
|
|
def day [] { date now | date format "%a %b %d" }
|
|
|
|
|
|
|
|
## Functions ##
|
|
|
|
def sshdev [port: int = 8080] {
|
|
|
|
$"Listening on localhost:($port)"
|
|
|
|
^ssh -i ~/.ssh/dev -N -T -R $"1337:localhost:($port)" dev@jolheiser.com
|
|
|
|
}
|
|
|
|
|
2023-07-22 21:00:53 +00:00
|
|
|
def nixdev [
|
2023-07-22 21:56:55 +00:00
|
|
|
name: string # Name of the dev shell to use
|
|
|
|
--bash: bool # Use bash instead of nushell
|
|
|
|
--refresh: bool # Refresh the flake
|
2023-07-22 21:00:53 +00:00
|
|
|
] {
|
|
|
|
let url = $"git+https://git.jojodev.com/jolheiser/dev-shells\#($name)"
|
2023-07-22 21:56:55 +00:00
|
|
|
let c = if ($bash) {""} else {"-c nu"}
|
|
|
|
let refresh = if ($refresh) {"--refresh"} else {""}
|
|
|
|
let cmd = $"nix develop ($refresh) ($url) ($c)"
|
|
|
|
^nu -c $cmd
|
2023-07-22 16:47:20 +00:00
|
|
|
}
|
|
|
|
|
2023-06-28 20:48:01 +00:00
|
|
|
## Other ##
|
2023-08-12 00:48:14 +00:00
|
|
|
$env.EDITOR = hx
|
|
|
|
$env.config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))
|
2023-06-28 20:48:01 +00:00
|
|
|
source ~/.config/nushell/zoxide.nu
|
|
|
|
source ~/.config/nushell/ohmyposh.nu
|
|
|
|
|