repositories / dotfiles
dotfiles
bugabingas dorkfiles
owned by bugabinga
nushell/gen-aliases.nu
Raw# create file initially, so that we can append to it later
let file = $"($nu.default-config-dir)/aliases.nu"
'' | save -f $file
def aka [
name: string # name of the new alias
command: string # program to alias to
...args: string # optional arguemtns to program
] {
if (which $command | is-not-empty) {
$"alias ($name) = ($command) ($args | str join ' ')\n" | save --append $file
}
}
########################################
# Start defining your aliases here
# semantic aliases
aka tree tre '--all' '--symbolic'
aka view wezterm imgcat
aka list ls '--long' '--all' '--du'
aka show bat
aka web firefox
aka code neovide
aka edit nvim '--clean'
aka timer tclock timer '--paused' '--no-millis' '--duration'
aka countdown tclock countdown '--time'
# pro aliases
aka ll ls '--long'
aka la ls '--long' '--all'
aka q exit
aka g git
aka gu gitu
aka vim nvim
aka vi nvim '--clean'
aka vide neovide
aka userctl systemctl '--user'
# CUSTOM LITTLE JAVA COMMANDS
aka aes java ($env.DOTFILES + /tools/ + aes.java)