Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clojure fn doc on multiple lines does not get show in CLI help #2

Open
ieugen opened this issue Mar 26, 2024 · 2 comments
Open

clojure fn doc on multiple lines does not get show in CLI help #2

ieugen opened this issue Mar 26, 2024 · 2 comments

Comments

@ieugen
Copy link

ieugen commented Mar 26, 2024

Hi,

Having something like this:

(defn verify
  "Verifies a certificate isn't expired and
   was signed by a trusted authority."
  [flags]
  (not-implemented))

gives something like this:

  ca       Create a self signed certificate authority
  keygen   Create a public/private key pair.         
  sign     Create and sign a certificate.            
  pring    Print details about a certificate         
  verify   Verifies a certificate isn't expired and 

As you can see the second line in verify is not printed.

Not sure how important it is to fix but I think it could be documented so users are not taken by surprise.

The main complaint IMO would be the surprise factor and juggling with linters / line too long issue.

Otherwise, nice project so far - currently exploring it.

@ieugen
Copy link
Author

ieugen commented Mar 26, 2024

This also happens to flags:

                 :commands ["ca" #'ca
                            "keygen" #'keygen
                            "sign" #'sign
                            "pring" #'my-print
                            "verify" {:command #'verify
                                      :flags ["--ca FILE" "Required: path to a file
                                                           containing one or more ca certificates"
                                              "--crt FILE" "Required: path to a file containing a single certificate"]}]}))

Gives me (notice description for --ca) :

  -V,              Prints the version                                      
  -h, --help       Prints this help message                                
      --ca FILE    Required: path to a file                                
      --crt FILE   Required: path to a file containing a single certificate

@plexus
Copy link
Member

plexus commented Apr 3, 2024

This is by design, we follow the same convention as for docstrings. Summary on the first line, longer explanation below that. You get the full docs for a command when you ask for its help.

For flags we don't surface that currently, maybe for flags it does make more sense to render the whole string, although then we'd also have to get smarter at aligning the different lines of text nicely.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants