Skip to content

Commit

Permalink
update doc
Browse files Browse the repository at this point in the history
  • Loading branch information
gokcehan committed Jan 24, 2021
1 parent 873cfe8 commit ea1ff74
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
8 changes: 8 additions & 0 deletions docstring.go

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

8 changes: 8 additions & 0 deletions lf.1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea1ff74

Please sign in to comment.