Skip to content

Commit

Permalink
(Minor): Change example in docs to work around a bug
Browse files Browse the repository at this point in the history
Currently, the example fails confusingly for newer versions
of `tput`. See gokcehan#718.
  • Loading branch information
ilyagr committed Oct 23, 2022
1 parent 904113b commit d6164c2
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -1204,7 +1204,8 @@ So now you can display a message in the current client by calling the following
Since lf does not have control flow syntax, remote commands are used for such needs.
For example, you can configure the number of columns in the ui with respect to the terminal width as follows:
cmd recol %{{
cmd recol ${{
# Use ${{ instead of %{{ to work around https://github.com/gokcehan/lf/issues/718.
w=$(tput cols)
if [ $w -le 80 ]; then
lf -remote "send $id set ratios 1:2"
Expand Down
3 changes: 2 additions & 1 deletion docstring.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion lf.1
Original file line number Diff line number Diff line change
Expand Up @@ -1435,7 +1435,8 @@ All clients have a unique id number but you may not be aware of the id number wh
Since lf does not have control flow syntax, remote commands are used for such needs. For example, you can configure the number of columns in the ui with respect to the terminal width as follows:
.PP
.EX
cmd recol %{{
cmd recol ${{
# Use ${{ instead of %{{ to work around https://github.com/gokcehan/lf/issues/718.
w=$(tput cols)
if [ $w -le 80 ]; then
lf -remote "send $id set ratios 1:2"
Expand Down

0 comments on commit d6164c2

Please sign in to comment.