Files
TerminalPolyjuice/nushell/modules/pj_aliases.nu
2026-02-08 17:21:28 +08:00

32 lines
1003 B
Nu

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 .. = cd ..
export alias ... = cd ../..
export alias .... = cd ../../..
export alias ..... = cd ../../../..
export alias ...... = cd ../../../../..
export alias ....... = cd ../../../../../..
export alias ........ = cd ../../../../../../..
export alias .......... = cd ../../../../../../../..
export def py [...rest: string] {
if (which ^py | is-not-empty) {
^py ...$rest
} else if (which ^python3 | is-not-empty) {
^python3 ...$rest
} else {
print "Error: Python is not installed or could not be found."
}
}
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