cantino / mcfly

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

Bug report: Does not work in termux #215

Open Efreak opened 2 years ago

Efreak commented 2 years ago

The 'which' error will have a pull request coming, it showed up when I updated mcfly to see if this had been fixed (I first installed a week ago, didn't initialize until now)

This should be a gif and/or a video embed below, github is doing something weird.

Screen_Recording_20211219-115148_Termux 720

mcfly is version 0.5.11, since I forgot to include that (I suggest adding it to the top right of the UI, currently that space is unused)

cantino commented 2 years ago

Is this bash?

Efreak commented 2 years ago

Yes

GNU bash, version 5.1.12(1)-release (aarch64-unknown-linux-android)
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>

This is free software; you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
cantino commented 2 years ago

Does it work in zsh?

xtkoba commented 2 years ago

Seems to work well with zsh (using mcfly 0.5.12 and zsh 5.8.1 packages in the Termux official repository).

2096779623 commented 1 year ago
(gdb) b 81
Breakpoint 1 at 0x1d8824: /data/data/com.termux/files/home/mcfly-0.7.0/src/main.rs:81. (2 locations)
(gdb) i b
Num     Type           Disp Enb Address            What
1       breakpoint     keep y   <MULTIPLE>         
1.1                         y   0x00000000001d8824 in mcfly::handle_search at src/main.rs:81
1.2                         y   0x00000000001d8888 in mcfly::handle_search at src/main.rs:81
(gdb) b use_tiocsti
Breakpoint 2 at 0x24d39c: file src/fake_typer.rs, line 11.
(gdb) set args search neofetch
(gdb) r
Starting program: /data/data/com.termux/files/usr/bin/mcfly search neofetch
[Thread debugging using libthread_db enabled]
McFly | ESC - Exit | ⏎ - Run | TAB - Edit | F1 - Switch Sort to Time | F2 - Delete                                                                                                                                                                     

$ neofetch

Breakpoint 2, core::str::{impl#0}::as_bytes (self="neofetch") at /home/builder/.termux-build/rust/src/library/core/src/str/mod.rs:327
327     in /home/builder/.termux-build/rust/src/library/core/src/str/mod.rs
(gdb) 
(gdb) b
Note: breakpoint 2 also set at pc 0x55557a239c.
Breakpoint 3 at 0x55557a239c: file /home/builder/.termux-build/rust/src/library/core/src/str/mod.rs, line 327.
(gdb) bt
#0  core::str::{impl#0}::as_bytes (self="neofetch") at /home/builder/.termux-build/rust/src/library/core/src/str/mod.rs:327
#1  mcfly::fake_typer::use_tiocsti (string="neofetch") at src/fake_typer.rs:11
#2  0x000000555572d9a8 in mcfly::handle_search (settings=0x7ffffff030) at src/main.rs:74
#3  0x000000555572df00 in mcfly::main () at src/main.rs:105
(gdb) i threads
  Id   Target Id                         Frame 
* 1    Thread 0x3591 (LWP 13713) "mcfly" core::str::{impl#0}::as_bytes (self="neofetch") at /home/builder/.termux-build/rust/src/library/core/src/str/mod.rs:327
cantino commented 1 year ago

I guess this terminal doesn't support TIOCSTI? https://www.qnx.com/developers/docs/7.0.0//index.html#com.qnx.doc.neutrino.devctl/topic/tioc/tiocsti.html

licy183 commented 1 year ago

TIOCSTI is disabled by selinux on Android 8.0+, see https://seclists.org/oss-sec/2017/q2/646.