Updates README.md with the latest VCS' segments modifications

This commit is contained in:
Emanuel Angelo 2017-10-04 23:22:38 +01:00
parent 4942ad51e5
commit b76f20d6bd

View file

@ -42,19 +42,21 @@ quick look into the state of your repo:
of commits is shown along with `⇡` or `⇣` indicating whether a git push
or pull is pending
In addition, git has a few extra symbols:
If files are modified or in conflict, the situation is summarized with the
following symbols:
- `✎` -- a file has been modified, but not staged for commit
- `✔` -- a file is staged for commit
- `✎` -- a file has been modified (but not staged for commit, in git)
- `✔` -- a file is staged for commit (git) or added for tracking
- `✼` -- a file has conflicts
FIXME
- A `+` appears when untracked files are present (except for git, which uses
`?` instead)
- `❓` -- a file is untracked
Each of these will have a number next to it if more than one file matches.
The segment can start with a symbol representing the version control system in
use. To show that symbol, the configuration file must have a variable `vcs`
with an option `show_symbol` set to `true` (see
[Segment Configuration](#segment-configuration)).
## Setup
This script uses ANSI color codes to display colors in a terminal. These are
@ -215,7 +217,7 @@ settings.
Some segments support additional configuration. The options for the segment are
nested under the name of the segment itself. For example, all of the options
for the `cwd` segment are set in `~/.powerline-shell.py` like:
for the `cwd` segment are set in `~/.powerline-shell.json` like:
```
{
@ -223,13 +225,17 @@ for the `cwd` segment are set in `~/.powerline-shell.py` like:
"cwd": {
options go here
}
"theme": "theme-name",
"vcs": {
options go here
}
}
```
The options for the `cwd` segment are:
- `mode`: If "plain" then simple text will be used to show the cwd. If
"dironly," only the current directory will be shown. Otherwise expands the
- `mode`: If `plain`, then simple text will be used to show the cwd. If
`dironly`, only the current directory will be shown. Otherwise expands the
cwd into individual directories.
- `max_depth`: Maximum number of directories to show in path
- `max_dir_size`: Maximum number of characters displayed for each directory in
@ -240,6 +246,12 @@ The `hostname` segment provides one option:
- `colorize`: If true, the hostname will be colorized based on a hash of
itself.
The `vcs` variable has one option:
- `show_symbol`: If `true`, the version control system segment will start with
a symbol representing the specific version control system in use in the
current directory.
### Contributing new types of segments
The `powerline_shell/segments` directory contains python scripts which are