mirror of
https://github.com/NixOS/nix
synced 2025-06-29 02:11:15 +02:00
Make '--help' do the same as 'help' (i.e. show a manpage)
This commit is contained in:
parent
488a826842
commit
b159d23800
7 changed files with 17 additions and 164 deletions
|
@ -20,8 +20,6 @@ public:
|
|||
wrong. */
|
||||
void parseCmdline(const Strings & cmdline);
|
||||
|
||||
virtual void printHelp(const string & programName, std::ostream & out);
|
||||
|
||||
/* Return a short one-line description of the command. */
|
||||
virtual std::string description() { return ""; }
|
||||
|
||||
|
@ -115,8 +113,6 @@ protected:
|
|||
|
||||
virtual bool processFlag(Strings::iterator & pos, Strings::iterator end);
|
||||
|
||||
virtual void printFlags(std::ostream & out);
|
||||
|
||||
/* Positional arguments. */
|
||||
struct ExpectedArg
|
||||
{
|
||||
|
@ -223,8 +219,6 @@ public:
|
|||
|
||||
MultiCommand(const Commands & commands);
|
||||
|
||||
void printHelp(const string & programName, std::ostream & out) override;
|
||||
|
||||
bool processFlag(Strings::iterator & pos, Strings::iterator end) override;
|
||||
|
||||
bool processArgs(const Strings & args, bool finish) override;
|
||||
|
@ -234,14 +228,6 @@ public:
|
|||
|
||||
Strings argvToStrings(int argc, char * * argv);
|
||||
|
||||
/* Helper function for rendering argument labels. */
|
||||
std::string renderLabels(const Strings & labels);
|
||||
|
||||
/* Helper function for printing 2-column tables. */
|
||||
typedef std::vector<std::pair<std::string, std::string>> Table2;
|
||||
|
||||
void printTable(std::ostream & out, const Table2 & table);
|
||||
|
||||
struct Completion {
|
||||
std::string completion;
|
||||
std::string description;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue