termux-app
termux-app copied to clipboard
strange glitch happening when using buttons
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
Are you using Samsung Keyboard? Switch to GBoard or any other keyboard app. Samsung keyboard often causes these glitches in Termux app.
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.
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.