summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGokcehan <gokcehankara@gmail.com>2021-01-24 16:33:49 +0300
committerGokcehan <gokcehankara@gmail.com>2021-01-24 16:33:49 +0300
commitea1ff74e55e2bd205afea8a6f6f681915782bb70 (patch)
tree39134dcff84a13755e8f9d4841b3f3cf02660f21
parent873cfe87a165d7105a8d6ea1337b99029290b32d (diff)
update docr19
-rw-r--r--doc.go7
-rw-r--r--docstring.go8
-rw-r--r--lf.18
3 files changed, 23 insertions, 0 deletions
diff --git a/doc.go b/doc.go
index 9f64999..b96c8f7 100644
--- a/doc.go
+++ b/doc.go
@@ -1202,6 +1202,13 @@ You can define it just as you would define any other command:
lf -remote "send $id set promptfmt \"$fmt\""
}}
+If you want to print escape sequences, you may redirect 'printf' output to '/dev/tty'.
+The following xterm specific escape sequence sets the terminal title to the working directory:
+
+ cmd on-cd &{{
+ printf "\033]0; $PWD\007" > /dev/tty
+ }}
+
This command runs whenever you change directory but not on startup.
You can add an extra call to make it run on startup as well:
diff --git a/docstring.go b/docstring.go
index 66aee68..67ca426 100644
--- a/docstring.go
+++ b/docstring.go
@@ -1346,6 +1346,14 @@ define any other command:
lf -remote "send $id set promptfmt \"$fmt\""
}}
+If you want to print escape sequences, you may redirect 'printf' output to
+'/dev/tty'. The following xterm specific escape sequence sets the terminal
+title to the working directory:
+
+ cmd on-cd &{{
+ printf "\033]0; $PWD\007" > /dev/tty
+ }}
+
This command runs whenever you change directory but not on startup. You can
add an extra call to make it run on startup as well:
diff --git a/lf.1 b/lf.1
index 8503e09..21a56e9 100644
--- a/lf.1
+++ b/lf.1
@@ -1323,6 +1323,14 @@ There is a special command 'on-cd' that runs a shell command when it is defined
}}
.EE
.PP
+If you want to print escape sequences, you may redirect 'printf' output to '/dev/tty'. The following xterm specific escape sequence sets the terminal title to the working directory:
+.PP
+.EX
+ cmd on-cd &{{
+ printf "\e033]0; $PWD\e007" > /dev/tty
+ }}
+.EE
+.PP
This command runs whenever you change directory but not on startup. You can add an extra call to make it run on startup as well:
.PP
.EX