Skip to content

Commit

Permalink
Readme fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Soft committed Oct 11, 2020
1 parent ff92912 commit 7624258
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 11 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ rainbowpath --palette 'fg=green,underlined;fg=yellow,bg=magenta,bold'
### Style Overrides

`--override` and `--separator-override` options make it possible to selectively
override the style of particular path component at a specific index.
override the style of a path component at the given index.

For example, the following command displays all the directory components of the
path as blue, except the first one (index `0` "this") which will be displayed as
For example, the following command prints all the directory components of the
path in blue, except the first one (index `0` "this") which will be printed in
yellow.

``` shell
Expand All @@ -125,14 +125,14 @@ rainbowpath -p 'fg=blue' -o 0 'fg=yellow' '/this/is/an/example/'

Component indexes can also be negative, in which case they start at the end of
the list of path components. For example, the following command will print
"example" as yellow.
"example" in yellow.

``` shell
rainbowpath -p 'fg=blue' -o -1 'fg=yellow' '/this/is/an/example/'
```

Override styles are merged with the base style from the palette. For example,
the following command will display example in blue bold font.
the following command will display example in bold blue font.

``` shell
rainbowpath -p 'fg=blue' -o -1 'bold' '/this/is/an/example/'
Expand Down
13 changes: 7 additions & 6 deletions man/rainbowpath.1
Original file line number Diff line number Diff line change
Expand Up @@ -116,31 +116,32 @@ rainbowpath --palette 'fg=green,underlined;fg=yellow,bg=magenta,bold'
.SH STYLE OVERRIDES

\fB\-\-override\fR and \fB\-\-separator-override\fR options make it possible to
selectively override the style of particular path component at a specific index.
selectively override the style of a path component at the given index.

For example, the following command displays all the directory components of the
path as blue, except the first one (index \fI0\fR `this') which will be
displayed as yellow.
For example, the following command prints all the directory components of the
path in blue, except the first one (index \fI0\fR `this') which will be printed
in yellow.

.nf
rainbowpath -p 'fg=blue' -o 0 'fg=yellow' '/this/is/an/example/'
.fi

Component indexes can also be negative, in which case they start at the end of
the list of path components. For example, the following command will print
`example' as yellow.
`example' in yellow.

.nf
rainbowpath -p 'fg=blue' -o -1 'fg=yellow' '/this/is/an/example/'
.fi

Override styles are merged with the base style from the palette. For example,
the following command will display example in blue bold font.
the following command will display example in bold blue font.

.nf
rainbowpath -p 'fg=blue' -o -1 'bold' '/this/is/an/example/'
.fi


Override styles are also able to revert style properties set by the base style.
This can be achieved by prefixing the property name with a \fI!\fR.

Expand Down

0 comments on commit 7624258

Please sign in to comment.