public ConverterOptions() { String columns = System.getProperty("columns", System.getenv("COLUMNS")); helpWidth = (columns != null && columns.matches("\\d+")) ? Integer.parseInt(columns) : DefaultConfig.HELP_WIDTH; ParserProperties props = ParserProperties.defaults() .withOptionSorter(null) .withUsageWidth(helpWidth) .withShowDefaults(false); parser = new CmdLineParser(this, props); }
public CommandLineArguments() { parser = new CmdLineParser(this, ParserProperties.defaults().withShowDefaults(true).withUsageWidth(80)); }
/** * Constructor. * * @param args command line arguments. */ public DefaultConfig(String... args) { String columns = System.getProperty("columns", System.getenv("COLUMNS")); helpWidth = (columns != null && columns.matches("\\d+")) ? Integer.parseInt(columns) : HELP_WIDTH; ParserProperties props = ParserProperties.defaults() .withOptionSorter(null) .withUsageWidth(helpWidth) .withShowDefaults(false); parser = new CmdLineParser(this, props); if (args.length > 0) parseCommandLine(args); }