-
Notifications
You must be signed in to change notification settings - Fork 554
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
A-Shell Support (iOS) #1350
Comments
Set environment variables |
I’ll try to look into it further, |
Also, a-shell supports I think it's currently detected as macOS, this is the output of
|
I want to help in this, but I need to borrow the phone from my brother, and it's his primary phone. |
iSH has been quite underwhelming and requires by far the most hoops to jump through, so I welcome any experiments to replace it with a better shell (a-shell) |
@Lockl00p can u check out a-shell? if all the requirements are fulfilled? |
I'm working towards getting download working, aria2c is GPL-2.0 licensed so it can't currently be included in a-shell, so I made a aria2c-optional I think it works but I'm not sure how to test it properly because everything I try to download is m3u8... |
Ooh this is interesting. An alternative to iShit? |
There are quite a few problems here: Essentially, if we want the install experience to be easier, we’d have to ship a pre-compiled version of fzf with ani-cli, one which (and I haven’t tested this, so can’t be sure) might have to be altered to work with webassembly. This is a mess, and I’m not sure port19x would be ok with doing all of this. If they are, then I might give it a shot. |
@port19x You said you didn’t want it to be a mess to maintain, so, your call. |
If you can compile Also, a-shell has iOS shortcuts support I've went ahead and made a little proof of concept to see how feasible creating a small Edit: I tried to test if the |
After looking into the absolute BS that is a-shell, I found a few things. First off, fzf uses go, and while go does allow you to compile to WASI, a-shell has a custom WASI SDK specifically for this app, so that’s quite a few missing features right there. In an attempt to find a replacement for fzf that doesn’t use ncurses (cause that also doesn’t exist here for some godforsaken reason), I found fzy, hopefully that works well enough. |
Sorry for the crude wording, I was just spending a while trying to find any fuzzy finder that would work because most used ncurses, the bane of my existence. |
This sucks. I don't think we're making any meaningful improvements over iSH if we have our users compile fzf and go. I suggest you collaborate with upstream to get go (and possibly fzf) into a-shell. |
I agree it's a little annoying, apparently macOS has
I agree, I've ran into so many iOS licensing issues, wasm/wasi bugs and limitations and weird a-shell behavior that it's been really frustrating, but I'm still optimistic I feel like it's feasible with a few upstream issues being fixed.
This was never the problem, there's no saturation where the user has to bulid anything, worst case we ship/link to a single
This also isn't really a problem, the options used for fzf are cosmetic: fzf "$1" --reverse --cycle --prompt "$2" so as long we can get any fuzzy finder to work and name it The bigger problem is the aria2 licensing situation, I've made an issue asking if they'll consider dual licensing MPL-2.0 which would make it possible for a-shell to bundle it, I've also made a curl fallback would it be acceptable to upstream into ani-cli?
I think I'll take a bit of a break as I'm a bit burnt out with this and I'm waiting on some upstream issues, I'd appreciate if this can stay open as I still have interest in working on this. |
I found an alternative to fzf (called fzy) that’s written in C this time, with the only bad part here being that it won’t support multiple selections (and is no longer maintained but that shouldn’t be a problem if it still works) If I can get this one to compile, I could just attempt to upstream fzy into a-shell repos and have ani-cli work with fzy. |
How? Is |
Eh, most of the fzf options are just “decorations” but no. However, it does have the prompt option. |
There is |
ooh! I'll see if that works! Thanks for the suggestion! |
So uh, funny thing, no bash. |
Well shit. So WASI cannot get key presses… meaning the only way it gets user text input is by waiting for the user to type the full string they want to input and press return. Basically every fuzzyfinder gets individual key presses, meaning we’re essentially screwed here. |
Instead of getting bash, can you re-write it to be POSIX? It might already be POSIX. |
That's not true, it is missing some termios stuff and on a-shell you can't read from Anways I'm working on porting |
Also, you shouldn't need fzf if you just want to automate downloads. |
Yeah we're trying to get a fuzzyfinder because ani-cli requires fzf and port19 doesn't want to have to go back to the previous interface just to support a-shell |
I see. But downloading isn't interactive, right? Or is it? @port19x, if it isn't fzf shouldn't be checked as a dependency. |
I'll try to get go working with a-shell though if I do, it will likely be with a ton of missing features (namely anything that requires interaction with the filesystem/os) |
Huh, funnily enough, if this ever works. it would require you to jump through a ton of hoops |
I know about non interactive mode but to supersede iSH support, we're going to need to support it (especially because it's the default, and guessing exact anime titles to avoid downloading the whole thing which might take a while and waste data is not an acceptable experience). Also I was wrong about reading input from stdin instead of |
So I managed to get fzy-js algorithm to work with jsc (cause turns out you can install node modules to a-shell, which you can use when running any js file on there. I'm going to then try to make a basic fuzzyfinder in js that's similar enough to fzy so that I can add support to fzy, and also use that support with a-shell. |
js |
Eh, you’re right. I think I might just wait for his fsh port. |
I have noticed that a-shell is so much worse than iSH. In return for the speed boost, you have to deal with WASI, randomly crash when opening dash, and for some reason sometimes outputted text that’s longer than your screen width just doesn’t wrap… @bbb651 are you sure this is worth it right now? Shouldn’t we at least wait till the bugs are ironed out? |
Is your feature request related to a problem? Please describe.
I would like to use ani-cli with a-shell to automate downloading anime through iOS shortcuts.
iSH also has really slow downloads compared to what iOS is capable of due to the overhead of virtualization (I'm pretty sure cloning the ani-cli repo in full on a-shell was faster than cloning it on iSH at depth 1).
Describe the solution you'd like
I would like ani-cli to add official support (tier 2, in addition/in-place of the iSH support) for a-shell.
Describe alternatives you've considered
Use this workaround to use ani-cli on iSH through shortcuts, downside being really complicated setup, requiring iSH to constantly run in the background, and the slow downloads.
Additional context
a-shell added ffmpeg support recently which was the biggest blocker.
After putting ani-cli in a-shell's
~/Documents/bin/
, I got the following error:The text was updated successfully, but these errors were encountered: