Aliases

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:

SolutionProblem
Bash aliasesMust edit file, source it, update all terminals
Shell functionsSame manual update process
SymlinksClutter, 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

FunctionDescriptionExample
cdwa <alias>Navigate to worktree by aliascdwa myproj
codewa <alias>Navigate to worktree and launch VS Codecodewa myproj
homeNavigate to current worktree’s root directoryhome
masterCheckout master branch in current worktreemaster
aliasesList all worktree aliasesaliases

Git Helper Functions

The script also includes convenient git shortcuts:

FunctionDescription
statusgit status
loggit log --oneline
pullgit pull
pushgit push
recentShow 15 most recent branches
stashgit stash
stash_listgit stash list
stash_popgit stash pop

Project Navigation Functions

Navigate relative to your current worktree root:

FunctionDescription
webNavigate to {worktree}/apps/casemgr_web
portalNavigate to {worktree}/apps/portal
featuresNavigate to {worktree}/apps/portal/src/features

Alias Commands Reference

CommandDescription
wa set --alias=nameSet alias for current worktree
wa get wa --alias=nameGet worktree path by alias
wa ls wa --aliasesList all aliases and their paths