#Why is there no tool/search function for getting prompts while searching up terminal commands?
39 messages · Page 1 of 1 (latest)
you mean auto suggestion like in fish?
Not just that.
When you type in ">something" in VS code, it'll show the relevant settings and functions that exist with that word.
Is there nothing like that? I'm tired of having to search online
Doesn't a single tab work for that?
I don't know if it's specific to certain shells
I use zsh, if I type the beginning of a command and press tab it will show every command that begin with the part I typed
That's not as powerful as what you want, but still similar
tldr? Also what chara said yeah
i dont think you can go much further than that
Another way would be to show every commands and grep an expression in it
Is it possible to use grep on command line manual?
From what I remember yes
Press tab?
Tab will autocomplete a lot of things, if they exist
Ah that was already said lol, but I think that is what you want really
I'm pretty sure they want to find an expression contained in a command, not completion
Ah, sounds fancy 🤔
Like atleast to show relevant commands so I can next look at manual of those
Sounds what you're looking for some kind of typing system on the commands and their arguments
That's not a thing, everything on the commandline are just strings
I'm not sure how you could determine between a regex string or a normal string
Ok found it
It's called apropos
This makes the most sense to me
Credit to The Linux Command Line book
I wondered about apropos but it wasn't very useful when I tried it
grep, sed, awk, and even pacman accept regex, none of which turn up there
Expanding the search to "regular expression" fills my terminal with garbage
Got it
I think what you really need is some kind of metadata database, like
{
"sed" : {
"features": ["regex", "text manipulation", "other features sed has"]
},
"grep" : {
"features": ["regex", "text filtering", "blah blah blah"]
},
// etc etc
}
``` then you could `metadataSearch regex` and it'd spit out "sed" and "grep"
To my knowledge that doesn't exist. I wondered if tldr would have that info but sadly not
Might be a useful little tool if you fancy a project 😄
I do fancy a project! But I'm still learning to code and use the terminal so 😅
Some kind of a natural language processing that can interpret the input different ways and categorise them based on that?
theres also howdoi
used to use it when i was newer https://github.com/gleitz/howdoi
just use fish and configure autocompletions in the config folder, many programs come with fish autocompletions too, as for a manual just use curl cht.sh/command-name and tldr command from the terminal, this is as far as you can go really, other stuff will just fill ur terminal with nonsense, look at cht.sh especially its very good since it aggregates documentation from many sources and needs just curl
I will try this. Thanks