Quick Reference - lars-hagen/dotfiles GitHub Wiki

Quick Reference Guide

A quick reference for common commands and workflows in this development environment.

🔄 Common Workflows

Directory Navigation

z <fuzzy>     # Jump to frequently used directory
cd -          # Go to previous directory

File Operations

eza           # Modern ls with icons and git status
eza -l        # Detailed list view
eza -T        # Tree view
bat <file>    # View file with syntax highlighting

Search Operations

Ctrl-T        # Fuzzy find files (fzf)
Ctrl-R        # Search command history
Alt-C         # Fuzzy find and cd into directory

Git Operations

g s           # git status
g c           # git commit
g p           # git push
g l           # git log (pretty format)
g a           # git add
g aa          # git add --all (stage all changes)
g ap          # git add -p (interactive staging)
g au          # git add -u (stage modified and deleted)

AWS Profile Management

assume <role>  # Switch AWS role
granted       # Launch AWS console

⌨️ Key Keyboard Shortcuts

Terminal Navigation

  • Ctrl-/: Toggle preview in fzf
  • Ctrl-L: Trigger Shell-GPT assistance
  • Tab: Smart completion with fzf-tab
  • Ctrl-Space: Accept zsh autosuggestion

Window Management (AeroSpace)

  • Cmd-1..9: Switch to workspace
  • Cmd-Shift-1..9: Move window to workspace
  • Cmd-H/L: Focus left/right window
  • Cmd-J/K: Focus up/down window

🛠️ Development Tools

Terraform

tf           # terraform
tfi          # terraform init
tfp          # terraform plan
tfa          # terraform apply
tfd          # terraform destroy
tfo          # terraform output
tfw          # terraform workspace

Docker

d ps          # List containers
d up          # Start containers
d down        # Stop containers

Package Management

brew bundle   # Install/update all packages
brew update   # Update Homebrew
brew upgrade  # Upgrade all packages

🔧 Environment Management

Shell Modes

toggle_mode   # Switch between work/personal mode

Python Environment

workon <env>  # Activate virtual environment
workoff      # Deactivate current virtual environment
mkvenv       # Create new virtual environment
rmvenv       # Remove virtual environment (deactivates first)

🚀 Quick Scripts

Create Temporary Script

temp_script   # Open vim to create/edit temporary script

Repository Overview

treegithub   # Show repository structure

🔍 Help and Documentation

Get Help

man <command>     # View manual
tldr <command>    # Quick command examples
sgpt "how to..." # Ask AI assistant

Update Documentation

dotfiles-update-brew-wiki  # Update package documentation

💡 Pro Tips

  1. Use Ctrl-R with fuzzy search for command history
  2. Leverage Shell-GPT (Ctrl-L) for command help
  3. Use z with fuzzy matching for quick directory jumps
  4. Tab completion shows previews with fzf-tab
  5. Personal mode (toggle_mode) keeps work/personal history separate

🔄 Common Update Tasks

Update Everything

# Update dotfiles
cd ~/dotfiles
git pull
./install.sh

# Update packages
brew update && brew upgrade
brew bundle

# Update Shell-GPT
pipx upgrade shell-gpt
⚠️ **GitHub.com Fallback** ⚠️