1
0
Fork 0
Go to file
Adam Price f17abd25b3 Add support for DSR response "OK" escape sequence
"VT100 defines an escape sequence [1] called Device Status Report (DSR). When
the DSR sequence received is `csi 5n`, an "OK" response `csi 0n` is returned.
This patch adds that "OK" response.

I encountered this missing sequence when I noticed that fzf [2] would clobber
my prompt whenever completing a find.

To test that ST doesn't currently respond to `csi 5n`, use fzf's shell
extension in ST's repo to complete the path for a file.

    my-fancy-prompt $ vim **<tab>
    <select a file>
    st.c

Select a file with <enter>, and notice that fzf clobbers some or all of your
prompt.

After applying this patch, do the same test as above and notice that fzf has no
longer clobbered your prompt by placing the file name in the correct position
in your command.

    my-fancy-prompt $ vim **<tab>
    <select a file>
    my-fancy prompt $ vim st.c

Thank you for considering my first patch submission.

[1] https://www.xfree86.org/current/ctlseqs.html#VT100%20Mode
[2] https://github.com/junegunn/fzf
"

Patch slightly adapted with input from the mailinglist,
2023-02-07 19:57:34 +01:00
FAQ FAQ: document the color emojis crash issue which affected some systems is fixed 2022-09-16 23:07:09 +02:00
LEGACY LEGACY: typo. 2012-09-18 19:08:03 +02:00
LICENSE LICENSE: bump year 2022-01-10 17:11:17 +01:00
Makefile Makefile: fix dependencies on config.h 2019-01-04 12:33:01 +01:00
README tic -s -> tic -sx (Treat unknown capabilities as user-defined.) 2016-11-14 19:05:47 +01:00
TODO Remove old TODO entry. 2015-04-13 17:06:11 +02:00
arg.h don't modify argv, use a counter 2018-03-20 21:22:27 +01:00
config.def.h Add support for OSC color sequences 2021-12-26 18:57:44 +01:00
config.mk bump version to 0.9 2022-10-04 19:40:30 +02:00
st.1 Add support for scroll(1) 2020-04-11 15:23:20 +02:00
st.c Add support for DSR response "OK" escape sequence 2023-02-07 19:57:34 +01:00
st.h code-golfing: cleanup osc color related code 2022-04-19 11:43:37 +02:00
st.info Partially add back in "support REP (repeat) escape sequence" 2020-05-30 22:04:28 +02:00
win.h code-golfing: cleanup osc color related code 2022-04-19 11:43:37 +02:00
x.c fix buffer overflow when handling long composed input 2022-10-25 17:11:11 +02:00

README

st - simple terminal
--------------------
st is a simple terminal emulator for X which sucks less.


Requirements
------------
In order to build st you need the Xlib header files.


Installation
------------
Edit config.mk to match your local setup (st is installed into
the /usr/local namespace by default).

Afterwards enter the following command to build and install st (if
necessary as root):

    make clean install


Running st
----------
If you did not install st with make clean install, you must compile
the st terminfo entry with the following command:

    tic -sx st.info

See the man page for additional details.

Credits
-------
Based on Aurélien APTEL <aurelien dot aptel at gmail dot com> bt source code.