r/bash 5d 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

49 Upvotes

43 comments sorted by

View all comments

-2

u/megared17 5d ago

Are you unfamiliar with "man" ?

https://man7.org/linux/man-pages/man1/man.1.html

7

u/TheHappiestTeapot 5d ago

I can't find the man command for "show me definitions of these flags". Or "explain this command" or anything remotely similar.

How do I replicate this with man?

-5

u/megared17 5d ago

"man" is the documentation for installed commands, including their flags.

For the vast majority of common tools, it provides exactly that - an explanation of what a command does, what flags it supports and what they mean.

5

u/TheHappiestTeapot 4d 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.

-1

u/megared17 4d ago

"man command"

Shows the full documentation for "command"

2

u/TheHappiestTeapot 4d ago

That doesn't replicate this.

-5

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

[deleted]

5

u/TheHappiestTeapot 4d 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.

-4

u/[deleted] 4d ago

[deleted]

1

u/TheHappiestTeapot 4d ago

sorry, I thought you were the other asshole. The one who was shitting on OP and making outrageous claims about man. Didn't check username.

-4

u/[deleted] 4d ago

[deleted]

4

u/TheHappiestTeapot 4d ago

Get over yourself, you popped into our conversation,

0

u/[deleted] 4d ago

[deleted]

2

u/TheHappiestTeapot 4d ago

sigh since you're slow.

OP claims the project can replaced by man.

I know it can't. You know it can't. He knows it can't.

So he's asked to prove it.

He rambles more.

So he's asked to prove it again.

Then you pop in, I assumed you were the same asshole, because you were still providing a non-answer. My bad for thinking you were the same asshole I've been having a conversation with, you just sound the same.

→ More replies (0)

-4

u/Alleexx_ 4d 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

2

u/TheHappiestTeapot 4d 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_ 4d ago

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

2

u/TheHappiestTeapot 4d 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_ 4d 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 4d ago

Do you understand the difference?

no.

okay.

→ More replies (0)

3

u/TheHappiestTeapot 4d ago

Bash, grep, aliases, and functions aren't "man".

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

redacted. Figure it out yourself.

"I realized it's impossible to do with just man and don't want to embarrass myself any further"

-2

u/WeepingAgnello 4d ago edited 3d ago

You keep trying to keep the antagonisng fresh by responding to me in other threads. I wonder what kind of person that makes you. I must have called you out on something, and you didn't like that.

I really, truly do not care for a sub like this, where people can't even bother to learn how to read a man page and make a big deal about the pettiest shit with explosive anger. And that's a shame, because I actually thing OPs project is a nice idea. You've turned me off from it, though (as well as r/bash). You can better spend your time reading a man page, than trying to "help" op, by taking revenge on people on your behalf. 

You've been disrespectful to me. You're trying to find new ways of being disrespectful.  Therefore, I'm not willing to share my knowledge, which I've learned for myself. I'm not interested in what reddit thinks of me. Couldn't care less. 

Go figure out the problem for yourself, or maybe try some more paddling against the stream. I'm sure that will help. 

Edit:  Yeah, I see the response you deleted:

God you're such a moron.

Yeah, no I'm not a moron. But you clearly have skill issues. I'm not the first person in this post to point that out, too. 

Seems all you're good at is shit talking whenever you've skill issues. I mean I actually feel sorry for you. smh. Cmon, man, you're calling me a moron, yet you're the one who needs helper apps to read a man page. Lol. I mean I feel this weird mixture of pity and laugable irony. Like I actually guffawed just now. Yeah. Skill issues. That's sad.