3 This plugin adds some utility functions to display additional information regarding your current
4 svn repository. See https://subversion.apache.org/ for the full svn documentation.
6 To use it, add `svn` to your plugins array:
14 | Command | Description |
15 |:----------------------|:--------------------------------------------|
16 | `svn_prompt_info` | Shows svn prompt in themes |
17 | `in_svn` | Checks if we're in an svn repository |
18 | `svn_get_repo_name` | Get repository name |
19 | `svn_get_branch_name` | Get branch name (see [caveats](#caveats)) |
20 | `svn_get_rev_nr` | Get revision number |
21 | `svn_dirty` | Checks if there are changes in the svn repo |
25 The plugin expects the first directory to be the current branch / tag / trunk. So it returns
26 the first path element if you don't use branches.
30 To use this in the `agnoster` theme follow these instructions:
32 1. Enable the svn plugin
34 2. Add the following lines to your `zshrc` file:
41 branch=$(svn_get_branch_name)
42 if [[ $(svn_dirty_choose_pwd 1 0) -eq 1 ]]; then
43 prompt_segment yellow black
44 echo -n "$rev@$branch"
47 prompt_segment green black
48 echo -n "$rev@$branch"
54 3. Override the agnoster `build_prompt()` function: