Maximus5 / ConEmu

Customizable Windows terminal with tabs, splits, quake-style, hotkeys and more
https://conemu.github.io/
BSD 3-Clause "New" or "Revised" License
8.5k stars 570 forks source link

Do not emit control characters in title reports #2536

Closed MartiUK closed 11 months ago

MartiUK commented 11 months ago

UNSAFE_CONSOLE_REPORT_CHARS does not cover everything, it's safer to not emit control characters in the title at all.

zouhair commented 11 months ago

This update starting to give me too many The terminal does not have the capability to report the cursor position. errors

Maximus5 commented 11 months ago

@zouhair Could you provide an example, which I can test working on the proper patch?

zouhair commented 11 months ago

Hmmm, it seems it's linked to smenu , may not be conemu bug, I use it in some script to generate simple menus that don't clear the console (as fzf does). I guess I have to use something else.

$ set -xv
history -a; history -n; history -a
++ history -a
++ history -n
++ history -a
(_z --add "$(command pwd -P 2>/dev/null)" 2>/dev/null &);
++ nonzero_return
+++ command pwd -P
++ RETVAL=0
++ '[' 0 -eq 0 ']'
++ echo ':)'
++ '[' 0 -ne 0 ']'
++ _z --add /home/poboxy
$ printf "Yes No Cancel" | smenu -d
printf "Yes No Cancel" | smenu -d
+ smenu -d
+ printf 'Yes No Cancel'
The terminal does not have the capability to report the cursor position.
history -a; history -n; history -a
++ history -a
++ history -n
++ history -a
(_z --add "$(command pwd -P 2>/dev/null)" 2>/dev/null &);
++ nonzero_return
++ RETVAL=1
++ '[' 1 -eq 0 ']'
++ '[' 1 -ne 0 ']'
++ echo 1
$ +++ command pwd -P
++ _z --add /home/poboxy
set +xv
set +xv
+ set +xv
$
zouhair commented 11 months ago

This latest commit 230724 fixed it

zouhair commented 11 months ago

Small coffee on the way 👍