1

So this might be wierd question but is there anyway to get the synomposis of a command in the terminal? what I mean by this is that if I write for example find I would like the terminal to write out the Synopsis part of the man page for find. I ofcourse don't want it to simply type everything in, but rather have a "grayed out" suggestion for what to write.

I think this would be extremely helpful for when you forget a specific command and don't want to simple go to the man page.

The redis-cli seems to do something like this... The main part here is that I want it to be inline, i. e. like redis-cli:

redis-cli image

David Foerster
  • 36,264
  • 56
  • 94
  • 147
munHunger
  • 143
  • That is not really what I am after. In that question there is a function which searches for a command. I already know the command I want to use, I just need the synopsis for it while I am typing – munHunger Feb 23 '18 at 07:31
  • I already contacted muru about it. Maybe one of the answers here can help you: https://askubuntu.com/q/991946/507051. I suppose what you really want is something like cheat or tldr. Sadly I didn't manage to write answers covering those on the linked question yet, but the github pages are pretty good and self-explanatory. – dessert Feb 23 '18 at 07:38
  • @munHunger sorry, I read "when you forget a specific command" and felt the old dupe was more appropriate. I changed it to the one dessert suggested. – muru Feb 23 '18 at 07:57
  • I still don't feel like my question has been answered on the other posts. Probably because I am bad at phrasing my question, but I want it to be inline... I added an image of how redis-cli does it, and I want something similar for my "normal" terminal – munHunger Feb 23 '18 at 08:29
  • Inline? I don't think bash completion does inline anywhere (nor does zsh, AFAIK). With zsh, some completion functions show option descriptions below the prompt. But I haven't seen inline for bash or zsh. Try zsh and its tab completion, which offers suggestions on what the next argument can be (also on the next line) – muru Feb 23 '18 at 08:40
  • Related: https://code.joejag.com/2014/why-zsh.html (see "killer tab completion" onwards) – muru Feb 23 '18 at 08:50
  • @muru it looks as if zsh is as far as I get... but it seems like it will do :) – munHunger Feb 23 '18 at 09:00

0 Answers0