Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
oh-my-zsh
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
github
oh-my-zsh
Commits
10ffa4fe
Commit
10ffa4fe
authored
Sep 27, 2016
by
Christian Ferbar
Committed by
Marc Cornellà
Sep 29, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add README to svn plugin
parent
ac8915d4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
0 deletions
+64
-0
README.md
plugins/svn/README.md
+64
-0
No files found.
plugins/svn/README.md
0 → 100644
View file @
10ffa4fe
# `svn` plugin
This plugin adds some utility functions to display additional information regarding your current
svn repsitiory. See http://subversion.apache.org/ for the full svn documentation.
## Functions
| Command | Description |
|:-----------------------|:----------------------------------------|
|svn_prompt_info | prompt for some themes |
|in_svn | within svn directory |
|svn_get_repo_name | |
|svn_get_branch_name | branch name (see caveats) |
|svn_get_rev_nr | revision number |
|svn_dirty | changes in this subversion repo |
## Caveats
The plugin expects the first directory to be the current branch / tag / trunk. So, it returns
the first path element if you don't use branches.
## Usage
To use it, add
`svn`
to your plugins array:
```
sh
plugins
=(
... svn
)
```
### Agnoster theme git-like prompt
Enable the svn plugin and add the followind lines to your
```~/.zshrc```
```
shell
prompt_svn
()
{
local
rev branch
if
in_svn
;
then
rev
=
$(
svn_get_rev_nr
)
branch
=
$(
svn_get_branch_name
)
if
[
`
svn_dirty_choose_pwd 1 0
`
-eq
1
]
;
then
prompt_segment yellow black
echo
-n
"
$rev
@
$branch
"
echo
-n
"±"
else
prompt_segment green black
echo
-n
"
$rev
@
$branch
"
fi
fi
}
```
override the agnoster build_prompt() function:
```
shell
build_prompt
()
{
RETVAL
=
$?
prompt_status
prompt_context
prompt_dir
prompt_git
prompt_svn
prompt_end
}
```
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment