build / build (push) Successful in 23m2s
- das-shell 0.3.0: aliases and functions for every interactive bash (/usr/share/das/shell, loaded by /etc/bash/bashrc.d/das-aliases.sh, then the user's ~/.bash_aliases and ~/.bash_functions; off with ~/.config/das/no-aliases). Based on the author's own set, adapted to Void (xbps, nftables, das-update), with fixes (rmhost, netinfo, todo -r, dirsize, extract) and new ones (up, bigfiles, pkgowner, please, serve, weather, cheat, genpass, Docker shortcuts). lsfunc shows bilingual descriptions. Shell tests in tests/test_shell.py. - Names that shadowed commands are gone: gh -> hgrep, mount -> mounts, no install or ed. - README: "Aliases and functions" section; TODO: banner, dashboard service and prompt verified by the author on real hardware. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
86 lines
3.0 KiB
Bash
86 lines
3.0 KiB
Bash
# Das OS aliases, loaded by /etc/bash/bashrc.d/das-aliases.sh in interactive
|
|
# shells. Your own ~/.bash_aliases is read after this file and wins.
|
|
# shellcheck shell=bash
|
|
|
|
# --- ls ---------------------------------------------------------------------
|
|
alias ls='ls --color=auto'
|
|
alias sl='ls'
|
|
alias l='ls -CF'
|
|
alias la='ls -A'
|
|
alias ll='ls -alF'
|
|
alias lsl='ls -lhFA --color=always | less -R'
|
|
alias lsz='ls --human-readable --size -1 -S --classify'
|
|
alias lst='ls -t -1'
|
|
alias lsd='ls -d */'
|
|
|
|
alias grep='grep --color=auto'
|
|
alias egrep='grep -E --color=auto'
|
|
alias fgrep='grep -F --color=auto'
|
|
alias diff='diff --color=auto'
|
|
alias ip='ip -color=auto'
|
|
|
|
# --- directories --------------------------------------------------------------
|
|
alias ..='cd ..'
|
|
alias cd..='cd ..'
|
|
alias ...='cd ../..'
|
|
alias ....='cd ../../..'
|
|
alias mkdir='mkdir -p'
|
|
alias path='echo "${PATH//:/$'\''\n'\''}"'
|
|
|
|
# --- files and disks ----------------------------------------------------------
|
|
alias cnt='find . -type f | wc -l'
|
|
alias fhere='find . -name'
|
|
alias df='df -h'
|
|
alias dft='df -Th --total -x tmpfs -x devtmpfs -x efivarfs'
|
|
alias dftl='df -Tha --total | less'
|
|
alias mounts='mount | column -t'
|
|
alias mnt="findmnt -rno SOURCE,TARGET,FSTYPE | grep '^/dev/' | sort | column -t"
|
|
alias snaps='sudo snapper -c root list'
|
|
|
|
# --- memory and processes -----------------------------------------------------
|
|
alias free='free -ht'
|
|
alias meminfo='command free -mlt'
|
|
alias cpuinfo='lscpu'
|
|
alias j='jobs -l'
|
|
alias psg='ps aux | grep -v grep | grep -i -e VSZ -e'
|
|
alias psmem='ps aux --sort=-%mem'
|
|
alias psmem10='ps aux --sort=-%mem | head -n 11'
|
|
alias pscpu='ps aux --sort=-%cpu'
|
|
alias pscpu10='ps aux --sort=-%cpu | head -n 11'
|
|
alias gpumeminfo='grep -i --color memory /var/log/Xorg.0.log ~/.local/share/xorg/Xorg.0.log 2>/dev/null'
|
|
|
|
# --- time ----------------------------------------------------------------------
|
|
alias now='date +"%T"'
|
|
alias nowtime='now'
|
|
alias nowdate='date +"%d-%m-%Y"'
|
|
|
|
# --- network -------------------------------------------------------------------
|
|
alias ping5='ping -c 5'
|
|
alias fastping='ping -c 100 -i 0.2'
|
|
alias oports='sudo ss -tulpn'
|
|
alias gport='sudo ss -tulpn | grep'
|
|
alias header='curl -I'
|
|
alias headerc='curl -I --compressed'
|
|
alias wget='wget -c'
|
|
alias nftlist='sudo nft list ruleset'
|
|
alias firewall='dfw status'
|
|
|
|
# --- history --------------------------------------------------------------
|
|
alias hgrep='history | grep'
|
|
alias histop10='histat 10'
|
|
|
|
# --- packages and updates (xbps) -------------------------------------------------
|
|
alias upd='das-update --cli'
|
|
alias updy='das-update --cli -y'
|
|
alias pkgclean='sudo xbps-remove -Oo'
|
|
|
|
# --- Docker and git ----------------------------------------------------------------
|
|
alias dps='docker ps --format "table {{.Names}}\t{{.Image}}\t{{.Status}}\t{{.Ports}}"'
|
|
alias dlog='docker logs -f --tail 100'
|
|
alias dcu='docker compose up -d'
|
|
alias dcd='docker compose down'
|
|
alias dcl='docker compose logs -f --tail 100'
|
|
alias dcp='docker compose pull'
|
|
alias lzd='lazydocker'
|
|
alias lzg='lazygit'
|