# ~/.zshrc — Shattershard terminal setup # https://shattershard.com/terminal.html export PATH="/usr/local/sbin:$PATH" # ---------- Network ---------- alias connections='sudo lsof -i -n -P' # Show open network connections alias myip='curl ident.me' # Show your external IP alias hosts='sudo nano /etc/hosts' # Edit /etc/hosts alias bettercap-ui='sudo bettercap -caplet http-ui' # Bettercap web UI # Wi-Fi diagnostics (deprecated on macOS 14.4+, still handy on older systems) alias airport='/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport' # ---------- Shortcuts ---------- alias c='clear' # Clear the terminal alias h='history' # Show command history alias k9='kill -9' # Kill a process with SIGKILL # ---------- Navigation ---------- alias ..='cd ..' alias ...='cd ../..' alias home='cd ~' alias rt='cd /' alias downloads='cd ~/Downloads' alias desktop='cd ~/Desktop' alias documents='cd ~/Documents' alias projects='cd ~/Developer/Projects' # ---------- Listing ---------- alias ll='ls -lah' # Detailed list, human-readable sizes alias la='ls -A' # All files except . and .. alias l='ls -CF' # Columns with type markers # ---------- History ---------- HISTFILE=~/.zsh_history HISTSIZE=5000 SAVEHIST=10000 setopt SHARE_HISTORY # Share history between open terminals setopt INC_APPEND_HISTORY # Save each command right away setopt HIST_IGNORE_DUPS # Skip consecutive duplicates # ---------- Prompt: user@host [path] $ ---------- export PS1="%B%F{green}%n@%m %F{yellow}[%d]%b%f \$ " export EDITOR=nano export VISUAL="$EDITOR" # ---------- Secrets ---------- # Never put API keys or tokens here — keep them in a separate file # that is not synced or committed anywhere: # echo 'export DO_TOKEN="..."' >> ~/.zsh_secrets && chmod 600 ~/.zsh_secrets [ -f ~/.zsh_secrets ] && source ~/.zsh_secrets # ---------- Plugins (brew install zsh-autosuggestions zsh-syntax-highlighting) ---------- ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=23' source "$HOMEBREW_PREFIX/share/zsh-autosuggestions/zsh-autosuggestions.zsh" # syntax-highlighting must be sourced last source "$HOMEBREW_PREFIX/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"