termux-app icon indicating copy to clipboard operation
termux-app copied to clipboard

strange glitch happening when using buttons

Open noponydeepweb opened this issue 1 year ago • 3 comments

Problem description

sometimes the term merges random commands or the previous ones with the one you writing making it give an error or execute other command. everytime i use it i have to rewrite a command which can take very long if its long, and can really make damage if its using a delicade command like rm

Steps to reproduce the behavior.

write a random command; press tab, ctrl, up or down; write something and click space or enter

What is the expected behavior?

No response

System information

  • Termux application version: 0.101 (Play Store)
  • Android OS version: 11
  • Device model: Galaxy A30

noponydeepweb avatar Feb 03 '24 18:02 noponydeepweb

Are you using Samsung Keyboard? Switch to GBoard or any other keyboard app. Samsung keyboard often causes these glitches in Termux app.

Sujoy-Paul avatar Mar 05 '24 11:03 Sujoy-Paul

What shell are you using? Do you have a custom prompt set for the shell? Sometimes shell can break your command if it has dynamic features like git info.

AliSananS avatar Mar 11 '24 12:03 AliSananS

Sometimes shell can break your command if it has dynamic features like git info.

That typically happens if user did not enclosed color sequences and other unprintable characters between \[ & \] tokens.

Bad:

PS1='\e[0;32m\w\e[0m \e[0;97m\$\e[0m '

Correct variant:

PS1='\[\e[0;32m\]\w\[\e[0m\] \[\e[0;97m\]\$\[\e[0m\] '

Although it is unknown what exactly happened for original poster. Steps to reproduce do not show described behavior and Play Store version of Termux is out-of-date. Suggesting switch to F-Droid or GitHub variant and try again, with default configuration.

sylirre avatar Mar 11 '24 14:03 sylirre