From d6164c28cb3909320c870a0544e08161ab189203 Mon Sep 17 00:00:00 2001 From: Ilya Grigoriev Date: Sat, 22 Oct 2022 22:07:30 -0700 Subject: [PATCH] (Minor): Change example in docs to work around a bug Currently, the example fails confusingly for newer versions of `tput`. See https://github.com/gokcehan/lf/issues/718. --- doc.go | 3 ++- docstring.go | 3 ++- lf.1 | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc.go b/doc.go index 56c538ae..3ae7a7e8 100644 --- a/doc.go +++ b/doc.go @@ -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" diff --git a/docstring.go b/docstring.go index 4eac3881..90c13b53 100644 --- a/docstring.go +++ b/docstring.go @@ -1286,7 +1286,8 @@ 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" diff --git a/lf.1 b/lf.1 index 8db4ee2e..798053b1 100644 --- a/lf.1 +++ b/lf.1 @@ -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"