# create file initially, so that we can append to it later let file = (($nu.user-autoload-dirs | last) | path join "20-aliases.nu") mkdir ($file | path dirname) '' | save -f $file def aka [ name: string # name of the new alias command: string # program to alias to ...args: string # optional arguments 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' # TODO use cyber-timer # aka timer tclock timer '--paused' '--no-millis' '--duration' # aka countdown tclock countdown '--time' aka video mpv '--no-config' '--vo=kitty' '--vo-kitty-use-shm=yes' '--profile=sw-fast' '--really-quiet' aka package mise use '--global' aka unpackage mise unuse '--global' # 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 zed zeditor aka delta delta '--hyperlinks' '--hyperlinks-file-link-format="file://{path}#{line}"' aka rg rg '--hyperlink-format=kitty' if (not $env.WIN32) { aka fg job unfreeze } # this is weird, but pi install does not work when i simply override "pi" aka pii pi 'install' aka pia pi '--tools' 'read,bash,edit,write,grep,find,ls' aka pic pi '--tools' 'read,bash,edit,write,grep,find,ls' '--continue' aka userctl systemctl '--user' # CUSTOM LITTLE JAVA COMMANDS aka aes java ($env.DOTFILES + /tools/ + aes.java)