mcfly icon indicating copy to clipboard operation
mcfly copied to clipboard

mcfly stopped working (kernel issue)

Open hferreiro opened this issue 2 years ago • 16 comments

Since some time ago, I cannot get mcfly to work. After running its UI with ctrl-r, pressing enter or tab on any row just goes back to bash with an empty prompt.

I tried emptying my .bashrc or running mcfly -d search directly without success. Is there any way to debug this issue?

hferreiro avatar Jul 04 '23 10:07 hferreiro

Does mcfly --version give output? And I assume you have eval "$(mcfly init bash)" in your bashrc?

cantino avatar Jul 07 '23 21:07 cantino

I got the same mistake, and this is my bash and mcfly versions: bash: 5.2.15 mcfly: 0.8.1

yingmanwumen avatar Jul 09 '23 11:07 yingmanwumen

this issue would help: https://github.com/dvorka/hstr/issues/478

yingmanwumen avatar Jul 09 '23 11:07 yingmanwumen

Does mcfly --version give output? And I assume you have eval "$(mcfly init bash)" in your bashrc?

Yes, it's initialized as that. Running mcfly works, what's not working is selecting something in its UI.

hferreiro avatar Jul 10 '23 08:07 hferreiro

this issue would help: dvorka/hstr#478

I can confirm this is the issue. The workaround at https://github.com/dvorka/hstr/issues/478#issuecomment-1616417044 is working for me:

$ sysctl -w dev.tty.legacy_tiocsti=1

hferreiro avatar Jul 10 '23 08:07 hferreiro

@cantino hstr is going to fix the same issue in the next release: https://github.com/dvorka/hstr/issues/486. Would mcfly fix this?

yingmanwumen avatar Jul 16 '23 17:07 yingmanwumen

If someone wants to work on this, I'd be happy to accept a fix. Does setting READLINE_LINE have the same effect as using tiocsti?

cantino avatar Aug 17 '23 22:08 cantino

+1 for the fix, odd!

koutsie avatar Aug 25 '23 18:08 koutsie

Fresh install of EndeavourOS, same issue:

  • GNU bash, version 5.1.16(1)-release (x86_64-pc-linux-gnu)
  • mcfly 0.8.1

Thanks for the fix hferreiro

grantcarthew avatar Oct 29 '23 22:10 grantcarthew

$ sysctl -w dev.tty.legacy_tiocsti=1 do we still have to use this? Also does it need to be turned off when we git a fix in mcfly?

Kernel: 6.7.4-zen1-1-zen

KAGEYAM4 avatar Feb 11 '24 08:02 KAGEYAM4

$ sysctl -w dev.tty.legacy_tiocsti=1 do we still have to use this? Also does it need to be turned off when we git a fix in mcfly?

Kernel: 6.7.4-zen1-1-zen

I'm still needing to run this in my terminal to be able to use McFly. The latest Kernel and updates were applied yesterday.

grantcarthew avatar Feb 12 '24 00:02 grantcarthew

$ sysctl -w dev.tty.legacy_tiocsti=1 do we still have to use this? Also does it need to be turned off when we git a fix in mcfly?

Kernel: 6.7.4-zen1-1-zen

I'm using Debian Testing with kernel version 6.6.13-amd64, and my current mcfly of version 0.8.4 just works without any special configuration at all, although the kernel config doesn't set tiocsti: image

yingmanwumen avatar Feb 14 '24 17:02 yingmanwumen

For me:

❯ uname -r
6.8.0-76060800daily20240311-generic
❯ cat /boot/config-6.8.0-76060800daily20240311-generic | rg TIOCSTI
# CONFIG_LEGACY_TIOCSTI is not set
❯ source /etc/os-release ; echo $VERSION
22.04.4 LTS (Jammy Jellyfish)

it is needed to set dev.tty.legacy_tiocsti=1, to work around this issue.

waja avatar Apr 08 '24 08:04 waja

This works on Arch (EndeavourOS) to make the fix survive a reboot:

echo "dev.tty.legacy_tiocsti=1" | sudo tee -a "/etc/sysctl.d/custom.conf"

grantcarthew avatar Apr 08 '24 22:04 grantcarthew

Confirmed this is https://github.com/cantino/mcfly/issues/333

cantino avatar Apr 28 '24 23:04 cantino

Is there a workaround for systems where you don't have root access?

Daniel15 avatar May 13 '24 21:05 Daniel15

Closed, this is https://github.com/cantino/mcfly/issues/333.

cantino avatar May 26 '24 03:05 cantino