0

I was playing with PS1 variable to decorate my terminal but suddenly this happened. error

It is continously throwing bash: unexpected EOF while looking for matching ')'. I tried CTRL + C and CTRL + D but nothing worked.

This code is from ~/.bahsrc file so it gets executed as soon as I open the terminal. Is there any way to fix this without clearing data of Termux?

If I need to clear data Termux, is there any way to backup the HOME Directory of Termux?

Sunlight
  • 165
  • 1
  • 11
  • Can you run any other shell than bash? – choroba Jun 10 '22 at 07:08
  • No. Because when I open the app the code automatically starts executing and throwing error – Sunlight Jun 10 '22 at 07:14
  • I have never worked with `termux`, but I bet that this application can be configured, with which command your shell is started. You could configure it to run a bash with the command `bash --norc`, and this would bypass your .bashrc. You then have a working shell from which you can easily debug your .bashrc. The problem of how tor run termux with a shell of your liking, is however a question which should be asked at [su] instead of stackoverflow, because it is not related to programming. – user1934428 Jun 10 '22 at 07:57

1 Answers1

1

When you hold the Termux icon, it should display a menu that makes it possible to run "Failsafe". There, you can mv .bashrc .bashrc.bad (or .profile or whatever causes the problem) and then run a normal session.

choroba
  • 231,213
  • 25
  • 204
  • 289