mcfly icon indicating copy to clipboard operation
mcfly copied to clipboard

Keyboard inputs are not visible

Open ssahaxd opened this issue 2 years ago • 8 comments

Keyboard inputs are not visible on the terminal after interrupting a command.

image After interrupting the first command I typed this which was not visible on the terminal.

ssahaxd avatar Apr 13 '22 07:04 ssahaxd

I think this has nothing to do with mcfly, but try typing reset and pressing return.

cantino avatar Apr 20 '22 01:04 cantino

There's definitely something wrong. Here's a bash script that, if started with Mcfly and interrupted with Ctrl+C, will leave you with a non-moving cursor. The "reset" command is needed to bring back the cursor.

Issue doesn't happen if running the script directly without Mcfly.

#!/bin/bash
echo "Sleeping..."
sleep 10
echo "finished"

My system is bash under Linux Mint, btw.

MarceloLimoriGM2dev avatar Apr 30 '22 22:04 MarceloLimoriGM2dev

I just tried this on zsh and bash on my Mac and it was fine. I'm not denying that there's a bug with mcfly in your environment, though. I assume the same thing does not happen if you hit tab instead of return, then run the command?

cantino avatar May 08 '22 16:05 cantino

Pressing tab seems to cause the same issue.

I just discovered, I don't need to type the name of the script either, not even run it from Mcfly. I can just trigger Mcfly with Ctr-R, then press Esc (or tab) to exit, and then if and only if, the first thing I run is the script and I cancel it, then the issue happens. If I run something else first, then I can run the script and cancel it and no problem happens.

So to summarize:

Trigger Mcfly and exit.

  1. Run script and cancel => issue.
  2. Run script and not cancel => no issue.
  3. Run something else and then run script and cancel => no issue.

Let me know if there's some logging info I can fetch for you and thanks for your response.

MarceloLimoriGM2dev avatar May 09 '22 00:05 MarceloLimoriGM2dev

Same issue: Fedora 35 Mcfly 0.61 Tilix Bash shell

I press CTRL-R and search for the command "yarn dev --https --port=8000" then press ENTER. I interrupt the above command with CTRL-C and then I don't see output on the shell. I'm forced to type the "reset" command blindly to obtain newly the control.

silviomarazzato avatar Aug 14 '22 13:08 silviomarazzato

Okay, so I think this is an existing issue, and a bug in Bash: https://github.com/cantino/mcfly/issues/240

What version of bash are you on? This is apparently fixed in 5.2.0(1)-alpha.

cantino avatar Aug 17 '22 01:08 cantino

My bash version is 5.1.8. I am seeing that 5.2.0 is still in beta and has not yet been released in the repositories of my distro. Is there any workaround to this problem?

silviomarazzato avatar Aug 17 '22 10:08 silviomarazzato

I'm not aware of any workaround unfortunately, beyond typing 'reset' when it happens. If you find one, please share it!

cantino avatar Aug 17 '22 20:08 cantino