"Restructuring, deprecating, blah blah."

This commit is contained in:
Aaron D. Lee
2025-12-15 21:31:14 -05:00
parent 9d632c16ed
commit 9673a1cb94
13 changed files with 467 additions and 390 deletions

View File

@@ -110,12 +110,14 @@ alias di='docker images'
alias dex='docker exec -it'
# System shortcuts
alias reload='source ~/.zshrc'
alias zshconfig='vim ~/.zshrc'
alias themeconfig='vim ~/.oh-my-zsh/themes/adlee.zsh-theme'
alias h='history'
alias c='clear'
# --- Source Dotfiles Aliases ---
if [[ -f "$HOME/.dotfiles/zsh/aliases.zsh" ]]; then
source "$HOME/.dotfiles/zsh/aliases.zsh"
fi
# Safe operations
alias rm='rm -i'
alias cp='cp -i'
@@ -325,8 +327,8 @@ fi
# --- Vault Integration ---
# Source vault secrets into environment (if vault exists and has secrets)
if command -v vault.sh &>/dev/null && [[ -f "$HOME/.dotfiles/vault/secrets.enc" ]]; then
eval "$(vault.sh shell 2>/dev/null)" || true
if command -v dotfiles-vault.sh &>/dev/null && [[ -f "$HOME/.dotfiles/vault/secrets.enc" ]]; then
eval "$(dotfiles-vault.sh shell 2>/dev/null)" || true
fi
# --- Password Manager Integration ---

91
zsh/aliases.zsh Normal file
View File

@@ -0,0 +1,91 @@
# ============================================================================
# Dotfiles Command Aliases
# ============================================================================
# Convenient shortcuts for dotfiles management scripts
#
# Source this file in .zshrc (already included by default)
# ============================================================================
# --- Core Dotfiles Commands ---
alias dotfiles='cd ~/.dotfiles'
alias df='cd ~/.dotfiles'
# Doctor - health check
alias dfd='dotfiles-doctor.sh'
alias doctor='dotfiles-doctor.sh'
alias dffix='dotfiles-doctor.sh --fix'
# Sync - multi-machine synchronization
alias dfs='dotfiles-sync.sh'
alias dfsync='dotfiles-sync.sh'
alias dfpush='dotfiles-sync.sh --push'
alias dfpull='dotfiles-sync.sh --pull'
alias dfstatus='dotfiles-sync.sh --status'
# Update - pull latest and reinstall
alias dfu='dotfiles-update.sh'
alias dfupdate='dotfiles-update.sh'
# Version - check version info
alias dfv='dotfiles-version.sh'
alias dfversion='dotfiles-version.sh'
# Stats - shell analytics
alias dfstats='dotfiles-stats.sh'
alias stats='dotfiles-stats.sh'
alias tophist='dotfiles-stats.sh --top'
alias suggest='dotfiles-stats.sh --suggest'
# Vault - secrets management
alias vault='dotfiles-vault.sh'
alias vls='dotfiles-vault.sh list'
alias vget='dotfiles-vault.sh get'
alias vset='dotfiles-vault.sh set'
# --- Quick Edit Aliases ---
alias zshrc='${EDITOR:-vim} ~/.zshrc'
alias dfconf='${EDITOR:-vim} ~/.dotfiles/dotfiles.conf'
alias dfedit='cd ~/.dotfiles && ${EDITOR:-vim} .'
# --- Reload Aliases ---
alias reload='source ~/.zshrc'
alias rl='source ~/.zshrc'
# ============================================================================
# Function Wrappers (for tab completion)
# ============================================================================
# Dotfiles main command with subcommands
dotfiles-cli() {
case "${1:-help}" in
doctor|doc|d) shift; dotfiles-doctor.sh "$@" ;;
sync|s) shift; dotfiles-sync.sh "$@" ;;
update|up|u) shift; dotfiles-update.sh "$@" ;;
version|ver|v) shift; dotfiles-version.sh "$@" ;;
stats|st) shift; dotfiles-stats.sh "$@" ;;
vault|vlt) shift; dotfiles-vault.sh "$@" ;;
edit|e) cd ~/.dotfiles && ${EDITOR:-vim} . ;;
cd) cd ~/.dotfiles ;;
help|--help|-h|*)
echo "Dotfiles CLI"
echo
echo "Usage: dotfiles-cli <command> [args]"
echo
echo "Commands:"
echo " doctor, d Run health check (--fix to auto-repair)"
echo " sync, s Sync dotfiles across machines"
echo " update, u Pull latest and reinstall"
echo " version, v Show version info"
echo " stats, st Shell analytics dashboard"
echo " vault, vlt Secrets management"
echo " edit, e Open dotfiles in editor"
echo " cd Change to dotfiles directory"
echo
echo "Aliases:"
echo " dfd, dffix, dfs, dfpush, dfpull, dfu, dfv, dfstats, vault"
;;
esac
}
# Short alias for the CLI
alias dfc='dotfiles-cli'

View File

@@ -1,5 +0,0 @@
#!/usr/bin/env bash
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
git clone https://github.com/zsh-users/zsh-syntax-highlighting ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting