Provides prompt functions and aliases for Arc VCS, similar to the built-in git plugin.
git clone https://github.com/dkryaklin/arc-zsh-plugin.git ~/.oh-my-zsh/custom/plugins/arcAdd arc to your plugins in ~/.zshrc:
plugins=(... arc)source ~/.oh-my-zsh/custom/plugins/arc/arc.plugin.zshAdd $(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) %# '| Function | Description |
|---|---|
arc_prompt_info |
Main prompt function: arc:(branch) ✗ |
arc_prompt_short |
Just branch name: (branch) |
arc_prompt_status |
Detailed counts: +2 ~3 ?1 |
arc_current_branch |
Returns current branch name |
arc_is_repo |
Returns 0 if in arc repo |
arc_is_dirty |
Returns 0 if there are changes |
arc_has_staged |
Returns 0 if there are staged files |
arc_has_untracked |
Returns 0 if there are untracked files |
arc_clear_cache |
Manually clear status cache |
| Symbol | Meaning |
|---|---|
| ✔ | Clean (no changes) |
| ✗ | Dirty (modified files) |
| ● | Staged changes |
| ? | Untracked files |
| ✖ | Merge conflicts |
| Alias | Command |
|---|---|
arst |
arc status |
arbr |
arc branch |
arco |
arc checkout |
arcob |
arc checkout -b |
ardf |
arc diff |
arlg |
arc log |
arad |
arc add |
arcm |
arc commit -m |
arcam |
arc commit -a -m |
arpl |
arc pull |
arps |
arc push |
arsb |
arc submit |
arsbm |
arc submit -m |
arrb |
arc rebase |
arstash |
arc stash push |
arstashp |
arc stash pop |
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=5Arc 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_cacheif needed
Prompt not updating after arc commands?
arc_clear_cacheArc commands are slow? Increase cache timeout:
ARC_STATUS_CACHE_TIMEOUT=10Colors not showing? Make sure you have colors enabled:
autoload -U colors && colors