Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add tty-write command #1961

Merged
merged 2 commits into from
Apr 13, 2025
Merged

Add tty-write command #1961

merged 2 commits into from
Apr 13, 2025

Conversation

joelim-work
Copy link
Collaborator

Based on discussion in #1943 (comment).

This command offers a synchronized way to write to /dev/tty.

Example usage:

cmd on-cd &{{
    lf -remote "send $id tty-write \"\033]0;$PWD\007\""
}}

cmd on-init :{{
    on-cd
}}

This command offers a synchronized way to write to /dev/tty.
@Kuchteq
Copy link

Kuchteq commented Apr 12, 2025

Could you modify the example given in the documentation about setting the terminal title to the working directory with this method?

cmd on-cd &{{
    lf -remote "send $id tty-write \"\033]0;$PWD\007\""
}}

The one that says:

If you want to print escape sequences, you may redirect printf output to /dev/tty.

@joelim-work
Copy link
Collaborator Author

@Kuchteq I missed that, thanks! I see that there's similar examples in the wiki too, so I will update those as well.

@joelim-work joelim-work merged commit 1cb9e9d into gokcehan:master Apr 13, 2025
4 checks passed
@joelim-work joelim-work deleted the tty-write branch April 13, 2025 01:14
@joelim-work joelim-work added the new Pull requests that add new behavior label Apr 13, 2025
@joelim-work joelim-work added this to the r35 milestone Apr 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new Pull requests that add new behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants