4.0.0 #414
                  
                    
                      ajalt
                    
                  
                
                  announced in
                Announcements
              
            
            
              4.0.0
            
            #414
          
          
        Replies: 0 comments
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Clikt 4.0 is a major release that uses the Mordant library for help formatting. If you aren't
customizing help output, this upgrade will probably be source compatible.
Highlights
Here are some of the highlights of this release. See
CHANGELOG.mdfor a detailed list of changes.Colors and Markdown in help output
All help strings now support markdown, including tables and lists. On terminals that support it,
help and error messages will be colored.
There are new lazy extensions for setting paramter help that you can use to add color to parameter help text:
option().help { theme.info("this text will use the theme color") }Optional and vararg values for options
You can now use
optionalValue()to create an option that can be used as a flag or with a valueYou can also use
varargValues()to create an option that accepts a variable number of values.Streamlined error handling
Clikt's exceptions now all inherit from
CliktError, and theCliktCommand.getFormattedHelpmethod renders them into strings for you. This makes customizing
mainmuch easier. The defaultimplementation is now just:
This discussion was created from the release 4.0.0.
Beta Was this translation helpful? Give feedback.
All reactions