holzschu / a-shell

A terminal for iOS, with multiple windows
BSD 3-Clause "New" or "Revised" License
2.69k stars 116 forks source link

Feature request #24

Open ifuchs opened 4 years ago

ifuchs commented 4 years ago

Git command would be a useful addition.

ifuchs commented 4 years ago

Ditto for Wget command.

holzschu commented 4 years ago

Related to wget, there is curl, which was much easier to port and has the same functionalities. But I'll add it to the TODO list.

OldUncleMe commented 3 years ago

Curious if wget was ever added? I'm locked out of most directories, too, and most commands, even those listed with help -l, are "operation not permitted". No su or sudo, and not sure how to proceed!

otoh, looks pretty amazing -> once I can crack the egg a little bit and access commands and some of the environment.

holzschu commented 3 years ago

These are different issues. wget is covered by the GPL, and the FSF official position is that the GPL is incompatible with AppStore distribution. The only solution would be to distribute a WebAssembly version of wget. I tried, but it uses setjmp()/longjmp(), which makes it incompatible with WebAssembly at the moment.

Short version: wget is going to take a long time. curl provides a similar functionality.

All commands saying "operation not permitted" sounds like a major issue on the other hand, and I'd like to solve it quickly. There is a possibility that you started in the "/" directory, instead of "~/Documents". What does "pwd" say? What is the effect of "cd"?

OldUncleMe commented 3 years ago

FFE77-CA0-239-A-43-D6-9-E3-D-E0449-A017814

A small screen-capture of a few commands. Copy+Paste from the terminal window was a no-go, and there does not seem to be an image posting facility here. Direct link to image, https://postimg.cc/TpP6Cjpf

I'd be glad to test more. I'll be in & out today. ([edit]Looks like the link code provided the image, good)

holzschu commented 3 years ago

Thanks for the screen capture, it really helps. I'm not sure at all what is happening (I reinstalled the app on one of my devices to be sure, and I had the normal behaviour).

cd works, but cd is an internal command (so is help). The behaviour of pwd is even stranger, because it was "command not found" at first, and then it worked.

I have a few more questions:

None of these should have an impact, but then again what happens to you should not happen, so... Anything that helps me in narrowing it down and reproducing it will help me in fixing it.

Right now, my most likely explanation is that the install was somehow corrupted, and the signature of some commands don't match the proper signature. If that was the case, un-installing then re-installing could help.

holzschu commented 3 years ago

Another possible issue: are you using a specific keyboard? If the keyboard has inserted invisible characters in the string, that could explain the "command not found".

OldUncleMe commented 3 years ago

I'll put the info up today, in a while. I can run some commands too, see what is working. From watching, it looks like some commands load...slowly before they can run. I'll re-install, too, if it's not correct again. The mode is as though I were a highly restricted user, FWIW.

Eq: Ipad Pro (4th gen), OS: iPadOS 14.6 - all Apple, not j/b I may try that dome day on older gear The keyboard is the built in (on screen) English(US) / default, though a few others are installed (*I like UniChar a lot ✔︎)

I was using a-shell full. I do have a/s mini installed, as well as ish, but they should have separate lib's and I had hard-rebooted before the cap you saw.

Great explanation about wget -- curl should be an excellent alternative, I'll learn it!

OldUncleMe commented 3 years ago

App store version of a-shell, I don't have TestFlight installed- haven't ever tried it yet.

holzschu commented 3 years ago

I still have no ideas what's going on. I'll try it in the simulator with your settings, see if I can reproduce the bug.

If you want to test: history, help, clear, credits, pickFolder, config, jsc, play, view, newWindow, exit, showmarks, alias, cd, unalias, pbcopy and pbpaste are internal commands (they don't require loading an external library), so they should load immediately (of course, "exit" closes the window, so use with caution). file, tree, ctags, jsi are commands using an external file and an internal command, so they should also load without problem.

The other commands require loading an external file and checking the permission with iOS, an operation that is supposed to be instantaneous but could be taking time. If the command says "command not found" several time, then works (as it does with pwd in your screenshot), then that's where I'm going to investigate.

OldUncleMe commented 3 years ago

Here's a start,

--

"We have the future in our hands!" Tom Frieden ― 2020.04.01

“ I want to sing like the birds sing, not worrying about who hears or what they think. ” ― Rumi

On Jul 10, 2021, at 11:10 AM, Nicolas Holzschuch @.***> wrote:

 I still have no ideas what's going on. I'll try it in the simulator with your settings, see if I can reproduce the bug.

If you want to test: history, help, clear, credits, pickFolder, config, jsc, play, view, newWindow, exit, showmarks, alias, cd, unalias, pbcopy and pbpaste are internal commands (they don't require loading an external library), so they should load immediately (of course, "exit" closes the window, so use with caution). file, tree, ctags, jsi are commands using an external file and an internal command, so they should also load without problem.

The other commands require loading an external file and checking the permission with iOS, an operation that is supposed to be instantaneous but could be taking time. If the command says "command not found" several time, then works (as it does with pwd in your screenshot), then that's where I'm going to investigate.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe.

holzschu commented 3 years ago

Hi, I suspect github has not taken your full contribution. The only thing I can see is "Here's a start".

OldUncleMe commented 3 years ago

A086-D787-E236-43-DE-B1-EA-9-EF0-B4680-EBA

Iwill uninstall a-shell mini and a-shell, then reinstall just a-shell. If there is a problem with library confusion this might clear it up.

OldUncleMe commented 3 years ago

2021.07.12:09:47 - after removing a-shell, a-shell mini and ish apps, then hard rebooting iPad, then re-installing a-shell app. I will try anumber of other commands, screenshot and post. 9-F09259-D-35-D1-4536-9789-93-F1-F19-FC018

holzschu commented 3 years ago

Hi, Thanks for the tests and the images. The latest image corresponds to the expected behavior: iOS has very restrictive user permissions. / can be read, but nothing under / can (but /System/Library can...).

Inside ~, you can read everything, but only create files and directories inside ~/Library, ~/Documents and ~/tmp. "cd" with no arguments takes you to ~/Documents.

I still have no idea why it wasn't working the first time.