Hwaro::CLI::Commands::Tool::ListCommand
Constants
DESCRIPTION = "List content files (all, drafts, published)"
FLAGS = [CONTENT_DIR_FLAG, SORT_FLAG, REVERSE_FLAG, LIMIT_FLAG, JSON_FLAG, HELP_FLAG]
Flags defined here are used both for OptionParser and completion generation
LIMIT_FLAG = FlagInfo.new(short: "-n", long: "--limit", description: "Show at most N files (applied after sorting)", takes_value: true, value_hint: "N")
NAME = "list"
Single source of truth for command metadata
POSITIONAL_ARGS = ["filter"]
POSITIONAL_CHOICES = ["all", "drafts", "published"]
REVERSE_FLAG = FlagInfo.new(short: "-r", long: "--reverse", description: "Reverse the sort order")
SORT_FLAG = FlagInfo.new(short: nil, long: "--sort", description: "Sort key: date (newest first, default), title, or path", takes_value: true, value_hint: "KEY")
Class methods
metadata
Source