Bugswriter / tuxi

Tuxi is a cli assistant. Get answers of your questions instantly.
GNU General Public License v3.0
1.33k stars 73 forks source link

Overhaul Usage Output & Add Man Page #177

Closed ghost closed 3 years ago

ghost commented 3 years ago

Hope this helps. Let me know if you have any questions or would like any changes to be made. Please refer to the commit messages for more information on the changes.

BTW, your installation process (makefile?) will eventually need to be updated to include the man(1) page, if you accepted this PR and/or used this/a man(1) page, but that's probably not needed just yet. You could always pull this PR into a new temporary branch, to which these documentation changes can be added.

As you probably already know, a man page is installed in '/usr/share/man/*/' at least on Linux. I'm fairly sure the category for Tuxi would be 1, so that's what I chose in this PR.

Albonycal commented 3 years ago

nicee

PureArtistry commented 3 years ago

this is really cool addition, thanks - I've hardly touched any of the doc stuff.

Big fan of your channel btw, there is probably code in the tuxi script that I specifically learnt from you

BeyondMagic commented 3 years ago

the manpage should be installed on /usr/local/share/man/ (Linux) as good practice

ghost commented 3 years ago

the manpage should be installed on /usr/local/share/man/ (Linux) as good practice

I've yet to see anything putting a page there. I looked on my setup, and unsurprisingly there's nothing there -- not even so much as a directory. All of the man pages typically go in '/usr/share/man/*/', so that's what I use for my programs too.

That said, I'm speaking from experience primarily on Debian- and Ubuntu-based systems. I haven't paid much attention to the location of a page on other distribution types, like Arch. Perhaps different distributions have different standards for the location?

Curious, I had a peek here, but couldn't find mention of a path which should be used, unless there's some sort of POSIX standard for a path. I also looked here and found this, which talks about '/usr/local' in Linux:

The original idea behind '/usr/local' was to have a separate ('local') '/usr' directory on every machine besides '/usr', which might be just mounted read-only from somewhere else. It copies the structure of '/usr'. These days, '/usr/local' is widely regarded as a good place in which to keep self-compiled or third-party programs. The /usr/local hierarchy is for use by the system administrator when installing software locally. It needs to be safe from being overwritten when the system software is updated. It may be used for programs and data that are shareable amongst a group of hosts, but not found in /usr. Locally installed software must be placed within /usr/local rather than /usr unless it is being installed to replace or upgrade software in /usr.

I suppose installing almost anything these days would be third-party (assuming that means not part of the core system components), yet rarely do I ever see things installing anything in '/usr/local'. The only thing which comes to mind is '/usr/local/bin/youtube-dl', unless you install it using a Debian package from the repositories, in which case it's the standard '/usr/bin/youtube-dl'. Is it supposed to be considered third party when it's not in the standard repositories?

Big fan of your channel btw, there is probably code in the tuxi script that I specifically learnt from you

Thank you. :)

BeyondMagic commented 3 years ago

That said, I'm speaking from experience primarily on Debian- and Ubuntu-based systems. I haven't paid much attention to the location of a page on other distribution types, like Arch. Perhaps different distributions have different standards for the location?

All suckless utilities and minimalist programs I use put their manpages there, using Artix (Arch based). I mentioned that because often I see non-essential or even very independent local host programs put in /usr/share when it would be better putting them in /usr/local/share for its third-party simple usage, though, it's not something that most of end-users care, so anywhere is good. That was more of a suggestion than a mandate.

Edit: talking a little more about developers not putting there, I do think that they just actually don't even know it exists or just forget it exists, what we can do, right? I don't think they not putting there should be a reason for us to not put there, too.

Bugswriter commented 3 years ago

are you guys okay with man page? Should I merge this PR? I mean I never thought there is any need of man page since lot of the things are not very confirmed and having a man page just for bunch of options .. BTW I am not saying it's a bad idea I am totally okay.

Albonycal commented 3 years ago

Yea.. man page is okay

ghost commented 3 years ago

having a man page just for bunch of options

That's why there are other sections for things other than just options. :P Plus, it includes more things than is reasonable in the brief usage output. You'll also have the author information, bug reporting section, and other bits and pieces which I think are quite important. I suppose it depends on how serious you are about this project; I'd assumed quite so, given how quickly it's grown.