Skip to content

Commit

Permalink
[DOC] Add explanation to PATTERN of brackets
Browse files Browse the repository at this point in the history
Fixes: #1933
  • Loading branch information
DaveDavenport committed Jan 9, 2024
1 parent 1a5e9e9 commit e74c2dc
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
9 changes: 9 additions & 0 deletions doc/rofi.1
Original file line number Diff line number Diff line change
Expand Up @@ -1340,6 +1340,15 @@ replaced at runtime:

.RE

.PP
It processes the string as follows: \fB\fC{key}\fR
is replaced by its value, if \fB\fC{key}\fR is not set it is removed. If the \fB\fC{key}\fR
is in between \fB\fC[]\fR all the text between \fB\fC[]\fR is removed if \fB\fC{key}\fR is not set.
Otherwise key is replaced and the \fB\fC[]\fR are removed.

.PP
For example: \fB\fC{ssh-client} [-p {port}] {host}\fR

.SH THEMING
.PP
Please see \fBrofi-theme(5)\fP manpage for more information on theming.
Expand Down
7 changes: 7 additions & 0 deletions doc/rofi.1.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -880,6 +880,13 @@ replaced at runtime:
- `{cmd}`: the command to execute
- `{window}`: the window ID of the selected window (in `window-command`)

It processes the string as follows: `{key}`
is replaced by its value, if `{key}` is not set it is removed. If the `{key}`
is in between `[]` all the text between `[]` is removed if `{key}` is not set.
Otherwise key is replaced and the `[]` are removed.

For example: `{ssh-client} [-p {port}] {host}`

## THEMING

Please see **rofi-theme(5)** manpage for more information on theming.
Expand Down

0 comments on commit e74c2dc

Please sign in to comment.