Aliases & Navigation
Aliases provide instant navigation to any worktree from anywhere in your filesystem.
The Navigation Problem
Projects live in deeply nested directories. Typing cd ~/Desktop/projects/company/frontend/feature-branch repeatedly is tedious. Traditional solutions have drawbacks:
| Solution | Problem |
|---|---|
| Bash aliases | Must edit file, source it, update all terminals |
| Shell functions | Same manual update process |
| Symlinks | Clutter, maintenance overhead |
Workareas Aliases
Workareas stores aliases in its database. No file editing, no sourcing—changes are immediate.
# Set an alias for current worktree
wa set --alias=myproj
# Get path by alias (for scripting)
wa get wa --alias=myproj
# List all aliases
wa ls wa --aliases
Fuzzy Matching
With the CaseMgr backend, aliases support fuzzy matching using Jaro distance. Even if you mistype or abbreviate, Workareas finds the best match:
# Alias is "casemgr"
wa get wa --alias=casemgr # exact match
wa get wa --alias=casemg # still works
wa get wa --alias=cmgr # still works
Bash Helper Functions
Workareas includes a helper script with useful bash functions. Add to your ~/.bashrc or ~/.zshrc:
# Source the helper functions
. ~/Desktop/projects/managing_workspaces/scripts/workarea-functions.sh
Core Workareas Functions
| Function | Description | Example |
|---|---|---|
cdwa <alias> | Navigate to worktree by alias | cdwa myproj |
codewa <alias> | Navigate to worktree and launch VS Code | codewa myproj |
home | Navigate to current worktree’s root directory | home |
master | Checkout master branch in current worktree | master |
aliases | List all worktree aliases | aliases |
Git Helper Functions
The script also includes convenient git shortcuts:
| Function | Description |
|---|---|
status | git status |
log | git log --oneline |
pull | git pull |
push | git push |
recent | Show 15 most recent branches |
stash | git stash |
stash_list | git stash list |
stash_pop | git stash pop |
Project Navigation Functions
Navigate relative to your current worktree root:
| Function | Description |
|---|---|
web | Navigate to {worktree}/apps/casemgr_web |
portal | Navigate to {worktree}/apps/portal |
features | Navigate to {worktree}/apps/portal/src/features |
Alias Commands Reference
| Command | Description |
|---|---|
wa set --alias=name | Set alias for current worktree |
wa get wa --alias=name | Get worktree path by alias |
wa ls wa --aliases | List all aliases and their paths |