dotnix/apps/nushell/jolheiser.nu

34 lines
841 B
Plaintext

## 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
}
def nixdev [
name: string # Name of the dev shell to use
--bash: bool # Use bash instead of nushell
] {
let url = $"git+https://git.jojodev.com/jolheiser/dev-shells\#($name)"
if ($bash) {
^nix develop $url
} else {
^nix develop $url -c nu
}
}
## Other ##
let-env EDITOR = hx
let-env config = ($env.config | upsert "shell_integration" ("WEZTERM_PANE" not-in $env and "SSH_CLIENT" not-in $env))
source ~/.config/nushell/zoxide.nu
source ~/.config/nushell/ohmyposh.nu