leo-arch / clifm

The shell-like, command line terminal file manager: simple, fast, extensible, and lightweight as hell.
https://github.com/leo-arch/clifm/wiki
GNU General Public License v2.0
1.35k stars 39 forks source link

Add description to flags for tab-suggestion #203

Closed theRoboxx closed 1 year ago

theRoboxx commented 1 year ago

Is it possible to add these short flag descriptions to clifm, like they are available in zsh?

clifm with TabCompletionMode=standard

swappy-20230323_194605

clifm with TabCompletionMode=fzf

swappy-20230323_194735

Describe the solution you'd like swappy-20230323_194527

leo-arch commented 1 year ago

Hi @theRoboxx.

This is possible, and indeed done for some internal commands (like the cmd command), but not for shell (or external) commands (not at least in the current state). To get the list of options for shell commands we parse the appropriate manpage; but our parser does not retrieve descriptions. Zsh does this, by contrast, using custom completion files provided by the application itself. So, no, we cannot do that at the moment.

What would be needed to get this done?

  1. An algorithm to parse custom completion files (we have none at the moment).
  2. Applications providing these files, which of course depends on external sources.