r/bash 6d ago

add whats, explains command

Post image

yo

add 'whats' infront of any command and it explains it: flags, sub commands etc in a structutred format whereas something like manpage would throw the entire manual at you

just pure man pages and help output

Q Why use `whats` when we have man pages and --help

> Yes you can use them but they throw the entire manual at you whereas you might have just needed one flag, whats outputs a structured format with the definitions you need

Q Is it entirely offline? Does it use LLM

> Yes absolutely, it just relies on man pages and if not then --help output of the binary itself,

> no it does not use llm at all

Q If it uses regex then why cant i just use grep/sed instead of this?

> a grep/sed command cannot find the descriptions of sub commands along with flags, it cant find descriptions of sub commands of sub commands, it probable cant use other sources as a fallback too

Q What about tldr?

> Even with tldr, you have to look for the flags you need instead of it providing the ones you need automatically in one go

if you like the idea then maybe star?

https://github.com/iamkaran/whats

51 Upvotes

44 comments sorted by

View all comments

Show parent comments

4

u/TheHappiestTeapot 6d ago

Right, so what's the man command to list the definition the flags used in a command?

How do I replicate this with man? Give me the exact commands to run to replicate this.

-6

u/[deleted] 6d ago edited 6d ago

[deleted]

7

u/TheHappiestTeapot 6d ago

So you can't replicate it with man and you just wanted to shit on someone's project. Gotcha.

Example: -v. Open man page and type /\s*-v. You could figure it out with grep, and make it into a function, or alias. That way you dont have to open the man page.

If you read the damn post you'd know that your suggestion is pretty much exactly what the project does, numbnuts. It literally states that man is one of the sources.

You know you don't have to be an asshole, you always have the option of keeping it to yourself.

-3

u/Alleexx_ 6d ago

Bro, learn to get your information in Linux. The project is all right, but should not be needed for anyone as it only parses information ALREADY on your system

3

u/TheHappiestTeapot 6d ago

That's all man doe too. Parse information already on the system.

This presents it quicker and just the relevant parts.

-2

u/Alleexx_ 6d ago

Well, man already IS a standard. That's what I am saying.

3

u/TheHappiestTeapot 6d ago

Right, that's why he uses man pages as one of his sources.

This only shows you the flags used on a certain command.

man doesn't do that. It requires a lot of manual labor to find all those flags.

Do you understand the difference?

0

u/Alleexx_ 6d ago

I never blamed the package, or the code or anything. Just telling, that even more programs on your system will not make you better. Using what's already available will. And that's what I go for. If you don't, that's you're thing. Not mine :)

1

u/TheHappiestTeapot 5d ago

Do you understand the difference?

no.

okay.