Zsh Git Relative Path
Description
Zsh Git 相对路径插件 一个简单但实用的 Zsh 插件,它可以在你的命令提示符中显示相对于 Git 项目根目录的当前路径。这个插件是在 AI 的协助下在短短 10 分钟内完成的,展示了 AI 辅助开发的强大能力。
Installation
This entry records only its repository, not the path inside it, so there is no
exact command to give. Open the source below and copy the folder into
~/.claude/skills/, or the file into ~/.claude/agents/.
README
zsh-git-relative-path
Show git-relative paths in your ZSH prompt
Oh My Zsh Plugin
Installation • Usage • Themes • Development
Features
- Zero configuration needed
- Works with any oh-my-zsh theme
- Special support for robbyrussell, agnoster, avit themes
- Falls back to normal path when not in a git repo
Prerequisites
- Oh My Zsh
- Node.js >= 14.0.0
Installation
npm install -g @cs-magic-open/zsh-git-relative-path
Done! The plugin auto-configures itself.
Usage
# Before (in /Users/username/projects/my-project/src/components)
username ~/projects/my-project/src/components $
# After (same directory)
username src/components $
Supported Themes
| Theme | Status |
|---|---|
| robbyrussell | Native support |
| agnoster | Native support |
| avit | Native support |
| Others | Auto-patched via %~, %c, %C replacement |
Development
git clone https://github.com/cs-magic-open/zsh-git-relative-path
cd zsh-git-relative-path
npm install -g .
# Debug mode
ZSH_GIT_PATH_DEBUG=1 source ~/.zshrc
License
MIT
Related Skills
Agency Agents
A complete AI agency at your fingertips - From frontend wizards to Reddit community ninjas, from whimsy inject
AI Firecrawl
🔥 The API to search, scrape, and interact with the web for AI
AI Artifacts Builder
Suite of tools for creating elaborate, multi-component claude.ai HTML artifacts using modern frontend web tech
AI CrewAI
Framework for orchestrating role-playing, autonomous AI agents. By fostering collaborative intelligence, CrewA
AI TrendRadar
⭐AI-driven public opinion & trend monitor with multi-platform aggregation, RSS, and smart alerts.🎯 告别信息过载,你的
AI mem0
| Universal memory layer for AI Agents | 51341 | 221 | 1 |
AI