cantino / mcfly

Fly through your shell history. Great Scott!
MIT License
6.75k stars 176 forks source link

mcfly stopped working (kernel issue) #371

Closed hferreiro closed 1 month ago

hferreiro commented 12 months ago

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?

cantino commented 12 months ago

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

yingmanwumen commented 11 months ago

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

yingmanwumen commented 11 months ago

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

hferreiro commented 11 months ago

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 commented 11 months ago

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
yingmanwumen commented 11 months ago

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

cantino commented 10 months ago

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?

koutsie commented 10 months ago

+1 for the fix, odd!

grantcarthew commented 8 months ago

Fresh install of EndeavourOS, same issue:

Thanks for the fix hferreiro

KAGEYAM4 commented 4 months ago

$ 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
grantcarthew commented 4 months ago

$ 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.

yingmanwumen commented 4 months ago

$ 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

waja commented 2 months ago

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.

grantcarthew commented 2 months ago

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"
cantino commented 2 months ago

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

Daniel15 commented 1 month ago

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

cantino commented 1 month ago

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