Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exiting with (exit) causes bash to misbehave #391

Closed
splayemu opened this issue Apr 7, 2020 · 4 comments
Closed

Exiting with (exit) causes bash to misbehave #391

splayemu opened this issue Apr 7, 2020 · 4 comments

Comments

@splayemu
Copy link

splayemu commented Apr 7, 2020

Issue

Exiting with (exit) breaks the shell (bash). I am also using tmux if that makes a difference. Using Ctrl-D or Ctrl-C to exit works fine.

After exiting, every time I press enter, it doesn't create a new prompt and instead writes next to the current prompt.

octopus@octotop:~$ joker
Welcome to joker v0.15.1. Use '(exit)', EOF (Ctrl-D) or SIGINT (Ctrl-C) to exit.
user=> (exit)
octopus@octotop:~$ -bash: asdfiasdfasdf: command not found
octopus@octotop:~$ octopus@octotop:~$ octopus@octotop:~$

Steps to reproduce:

  1. run joker (v0.15.1)
  2. type (exit) to quit
  3. Type anything and notice bash misbehaving

Environment:

Joker: v0.15.1
Linux: Debian GNU/Linux bullseye/sid
Bash w/ tmux

Let me know if you need any more information!

@jcburley
Copy link
Contributor

jcburley commented Apr 8, 2020

I can repro this using Bash on Mac OS X (darwin).

WORKAROUND: reset (in Bash) to restore echoing.

It's a regression, in that introducing liner (to replace readline) caused this behavior in the first place, but I'm quite sure I confirmed 29c1970 fixed it.

Maybe something broke it later?

@jcburley
Copy link
Contributor

jcburley commented Apr 8, 2020

Oh, looks like rl.Close() got lost during e84b1d8.

@jcburley
Copy link
Contributor

jcburley commented Apr 8, 2020

#392 fixes this.

@candid82
Copy link
Owner

candid82 commented Apr 8, 2020

Ugh... Thanks @splayemu for reporting and @jcburley for the proposed fix! It's a regression indeed and it doesn't help that I use fish that doesn't have this issue for whatever reason. I cut a new release with the fix.

@candid82 candid82 closed this as completed Apr 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants