termux / termux-packages

A package build system for Termux.
https://termux.dev
Other
13.33k stars 3.07k forks source link

[Package]: Pet - Bookmark your favorite command #11119

Closed OilSubjectLoss7 closed 2 years ago

OilSubjectLoss7 commented 2 years ago

Package description

Save snippets or your favorite command

Home page URL

https://github.com/knqyf263/pet

Source code URL

https://github.com/knqyf263/pet

Packaging policy acknowledgement

Additional information

No response

ghost commented 2 years ago

Not sure whether this will work on Termux without major hacking, but then I am not a Termux dev.

Dependency fzf is already available on Termux. But the pet code (whether from git master, or release) seems hard-coded for installation to directory /usr/local, which will not work in Termux. I hunted through the source code, and found no place to edit the prefix. As with many other golang programs, this one grabs components from other places, meaning that all of those other places would need their code re-compiled for Termux.

In the downloaded pet directory, I ran make install and all it did (AFAIK) was give a one-line reply, without error. But I did not find program pet installed anywhere, and it was not anywhere in the downloaded directory.

Although it has less capability than pet, I put my favorite commands as aliases in .bashrc. For example, alias gui launches the xfce4 desktop. I use nano instead of vi, and have alias edit launch nano with a specific set of options.

OilSubjectLoss7 commented 2 years ago

Not sure whether this will work on Termux without major hacking, but then I am not a Termux dev.

Dependency fzf is already available on Termux. But the pet code (whether from git master, or release) seems hard-coded for installation to directory /usr/local, which will not work in Termux. I hunted through the source code, and found no place to edit the prefix. As with many other golang programs, this one grabs components from other places, meaning that all of those other places would need their code re-compiled for Termux.

In the downloaded pet directory, I ran make install and all it did (AFAIK) was give a one-line reply, without error. But I did not find program pet installed anywhere, and it was not anywhere in the downloaded directory.

Although it has less capability than pet, I put my favorite commands as aliases in .bashrc. For example, alias gui launches the xfce4 desktop. I use nano instead of vi, and have alias edit launch nano with a specific set of options.

Oh well, i guess i have to stick to

command arg operator #bookmark1 #bookmark2 command arg operator

2096779623 commented 2 years ago

I successfully built it on Termux and it works fine.