lux icon indicating copy to clipboard operation
lux copied to clipboard

`^SH-PROMPT:` expectation not working because of control sequences

Open davidmartos96 opened this issue 2 years ago • 4 comments
trafficstars

I'm having an issue running the examples. It looks like the shell is sending additional characters that don't match the expectation. Should these be ignored?

\e[?2004h and \e[?2004l are known sequences, but I'm not too familiar with them.

image

davidmartos96 avatar Sep 01 '23 17:09 davidmartos96

HI,

Have you tried to add

set enable-bracketed-paste off

to your ~/.inputrc?

/Håkan

On Fri, Sep 1, 2023 at 7:44 PM David Martos @.***> wrote:

I'm having an issue running the examples. It looks like the shell is sending additional characters that don't match the expectation. Should these be ignored?

\e[?2004h and \e[?2004l are known sequences, but I'm not too familiar with them.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

Message ID: @.***>

hawk avatar Sep 04 '23 09:09 hawk

@hawk That worked, thanks. Would there be a way to use that setting only when running lux? I would prefer not to change the defaults on my system.

Do you think it would still make sense to make this a configuration on lux, or ignore those sequences?

Also, isn't this something that should affect more people? I didn't change any of the input settings and this fails with bash, zsh and fish. Tried on different terminals as well (Wezterm, Gnome terminal and Xterm)

davidmartos96 avatar Sep 05 '23 07:09 davidmartos96

You can put a setting like this in the system wide luxcfg file. (Or in a architecture specific luxcfg file.)

  • [config shell_prompt_cmd=set enable-bracketed-paste off; export

PS1=SH-PROMPT:]*

If needed, you can also change the setting of shell_prompt_regexp.

/Håkan

On Tue, Sep 5, 2023 at 9:07 AM David Martos @.***> wrote:

@hawk https://github.com/hawk That worked, thanks. Would there be a way to use that setting only when running lux? I would prefer not to change the defaults on my system.

Do you think it would still make sense to make this a configuration on lux, or ignore those sequences?

Also, isn't this something that should affect more people? I didn't change any of the input settings and this fails with bash, zsh and fish. Tried on different terminals as well (Wezterm, Gnome terminal and Xterm)

— Reply to this email directly, view it on GitHub https://github.com/hawk/lux/issues/50#issuecomment-1706059410, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABGTMBSWGE2FICZYZG2RODXY3FT7ANCNFSM6AAAAAA4H35GJ4 . You are receiving this because you were mentioned.Message ID: @.***>

hawk avatar Sep 05 '23 09:09 hawk

Ok thank you!

davidmartos96 avatar Sep 05 '23 11:09 davidmartos96