printHelp static method
void
printHelp()
Displays help and usage information for the application
Prints a formatted help message showing all available options, their descriptions, and example commands.
Implementation
static void printHelp() {
final parser =
ArgParser()
..addFlag(
'size',
abbr: 's',
help: 'Show file and directory sizes',
negatable: false,
)
..addFlag(
'help',
abbr: 'h',
help: 'Show help information',
negatable: false,
)
..addFlag(
'quiet',
abbr: 'q',
help: 'Suppress error messages',
negatable: false,
)
..addMultiOption(
'ignore',
abbr: 'i',
help: 'Patterns to ignore (can be used multiple times)',
)
..addOption(
'sort-by',
help: 'Sort entries by (name, size)',
allowed: ['name', 'size'],
allowedHelp: {
'name': 'Sort entries by name',
'size': 'Sort entries by size (requires --size flag)',
},
)
..addOption(
'sort-direction',
help: 'Sort direction (asc, desc)',
allowed: ['asc', 'desc'],
allowedHelp: {
'asc': 'Sort in ascending order',
'desc': 'Sort in descending order',
},
)
..addOption(
'level',
abbr: 'l',
help: 'Maximum directory depth to display',
valueHelp: 'n',
);
_printUsage(parser);
}