nushell config

This commit is contained in:
2026-01-30 16:48:11 +08:00
parent 165681a18e
commit 05b2a28b94
10 changed files with 246 additions and 56 deletions

View File

@@ -0,0 +1,21 @@
export alias l = ls
export alias ll = ls -l
export alias la = ls -a
export alias lla = ls -la
export alias lh = ls -lh
export alias lt = ls -l | sort-by modified | reverse
export alias cdi = cd (ls **/ | get name | str join "\n" | fzf)
export def py [...rest: string] {
if (which ^py | is-not-empty) {
^py ...$rest
} else {
^python3 ...$rest
}
}
export alias weather = curl wttr.in
export alias moon = curl wttr.in/Moon
export alias quote = curl https://api.quotable.io/random | from json | get content
export alias dadjoke = curl -H "Accept: application/json" https://icanhazdadjoke.com/ | from json | get joke