Arc Plugin for Oh My Zsh

February 10, 2026 · View on GitHub

Provides prompt functions and aliases for Arc VCS, similar to the built-in git plugin.

Installation

git clone https://github.com/dkryaklin/arc-zsh-plugin.git ~/.oh-my-zsh/custom/plugins/arc

Option 1: Oh My Zsh plugin

Add arc to your plugins in ~/.zshrc:

plugins=(... arc)

Option 2: Direct source

source ~/.oh-my-zsh/custom/plugins/arc/arc.plugin.zsh

Usage in Prompt

Add $(arc_prompt_info) to your PROMPT or RPROMPT in ~/.zshrc:

# Example: Add to right prompt
RPROMPT='$(arc_prompt_info)'

# Example: Add to main prompt
PROMPT='%{$fg[cyan]%}%c%{$reset_color%} $(arc_prompt_info) %# '

Available Functions

FunctionDescription
arc_prompt_infoMain prompt function: arc:(branch) ✗
arc_prompt_shortJust branch name: (branch)
arc_prompt_statusDetailed counts: +2 ~3 ?1
arc_current_branchReturns current branch name
arc_is_repoReturns 0 if in arc repo
arc_is_dirtyReturns 0 if there are changes
arc_has_stagedReturns 0 if there are staged files
arc_has_untrackedReturns 0 if there are untracked files
arc_clear_cacheManually clear status cache

Status Symbols

SymbolMeaning
Clean (no changes)
Dirty (modified files)
Staged changes
?Untracked files
Merge conflicts

Aliases

AliasCommand
arstarc status
arbrarc branch
arcoarc checkout
arcobarc checkout -b
ardfarc diff
arlgarc log
aradarc add
arcmarc commit -m
arcamarc commit -a -m
arplarc pull
arpsarc push
arsbarc submit
arsbmarc submit -m
arrbarc rebase
arstasharc stash push
arstashparc stash pop

Configuration

Customize symbols and colors in your ~/.zshrc (before loading the plugin):

# Change prefix/suffix
ARC_PROMPT_PREFIX="%{$fg[blue]%}["
ARC_PROMPT_SUFFIX="%{$reset_color%}]"

# Change symbols
ARC_PROMPT_DIRTY=" *"
ARC_PROMPT_CLEAN=""
ARC_PROMPT_STAGED=" +"
ARC_PROMPT_UNTRACKED=" ?"

# Cache timeout in seconds (default: 2)
# Increase if arc is slow in your repo
ARC_STATUS_CACHE_TIMEOUT=5

Performance

Arc can be slower than git in large monorepos. The plugin includes:

  • Status caching: Results are cached for 2 seconds (configurable)
  • Auto cache clear: Cache is cleared after arc commands (commit, checkout, etc.)
  • Manual clear: Call arc_clear_cache if needed

Troubleshooting

Prompt not updating after arc commands?

arc_clear_cache

Arc commands are slow? Increase cache timeout:

ARC_STATUS_CACHE_TIMEOUT=10

Colors not showing? Make sure you have colors enabled:

autoload -U colors && colors