holzschu / a-shell

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

Any possibility to add git and neofetch commands? #655

Open ziyic opened 1 year ago

ziyic commented 1 year ago

Is there any possibility to add git and neofetch commands to this shell?

I can see the command make in the output of help -h, which provides a possibility to build neofetch, but it seems to be missing most of the git dependencies which need to be installed separately

holzschu commented 1 year ago

git is covered by the GPL, and the position of the FSF, for the time being, is that the GPL is incompatible with AppStore distribution. I respect that decision, so a-Shell only provides BSD commands.

lg2 (libgit2) is an executable that provides a similar behaviour as git (but without the submodules part and the GPL license). You can type pkg install git to install a small script that with call lg2 every time you type git.

That being said, neofetch seems to be using bash, and a-Shell doesn't have bash for the same reason (it's covered by the GPL). The makefile doesn't do anything, execpt copy the binary and the man page in the right place.

bbb651 commented 3 months ago

Is it possible to add gitoxide (which provides gix as a git implementation) instead of git? It’s MIT licensed and it compiles to ios. It is currently missing a lot of subcommands (e.g. git-commit) but it’s progressing nicely and honestly git-clone is probably the most common use case.

holzschu commented 3 months ago

So far it doesn't work (as in: it doesn't cross-compile for iOS, despite what was said). I've contacted the poster in order to get more information. In its current state, according to your description, gitoxide provides fewer features than lg2, which we already have.

bbb651 commented 3 months ago

I wasn't aware libgit2 has a git reimplementation nor that it is included in a-shell already :)

Edit: I somehow completely missed that entire paragraph in your previous comment, sorry for bumping the issue

Maybe lg2 should be symlinked/hardlinked/aliased as git, or suggest lg2 when trying to use git.

The situation seems unlikely to change in the future, maybe the issue should be closed?

holzschu commented 3 months ago

If you type "pkg install git", it will add a wrapper around lg2 so that git command works. There are differences between lg2 and git, though, and there are vim plugins that call git when it exists in order to update themselves. By sheer bad luck, they call git with options that do not work with lg2, so I had to remove the symlink/hardlink.