Files
TerminalPolyjuice/nushell/modules/pj_aliases.nu
T
gwbeip 727e4977f8 feat(deepseek api): add balance query and API key management
Add pj deepseek command to query account balance and
pj deepseek setkey to store API key in local cache.

Also extract Python launcher into its own module (pj_python.nu)
and add common aliases (g, c, tree, myip, ports, df, reload, edit).
2026-06-14 11:10:16 +08:00

45 lines
1.3 KiB
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 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
# --- Git ---
export alias g = git
# --- Navigation & Shell ---
export alias c = clear
export def reload [] { exec nu }
export def edit [] { ^$env.EDITOR ($env.NU_POLYJUICE_PATH | path join 'nu_polyjuice.nu') }
# --- File system ---
export alias tree = ls **/*
# --- Network ---
export alias myip = curl -s ifconfig.me
export def ports [] { ^netstat -ano | lines | where {|row| $row | str contains 'LISTENING'} | str trim }
# --- System ---
export def df [] {
if (which ^df | is-not-empty) {
^df -h
} else {
^wmic logicaldisk get size,freespace,caption
}
}