mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
'-h' should show help
Signed-off-by: Thomas Lauf <thomas.lauf@tngtech.com>
This commit is contained in:
parent
6bb4f981cb
commit
037550b791
3 changed files with 26 additions and 7 deletions
|
@ -1,6 +1,6 @@
|
|||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Copyright 2006 - 2016, Paul Beckingham, Federico Hernandez.
|
||||
// Copyright 2006 - 2019, Thomas Lauf, Paul Beckingham, Federico Hernandez.
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
|
@ -445,10 +445,9 @@ void CLI::canonicalizeNames ()
|
|||
alreadyFoundCmd = true;
|
||||
}
|
||||
|
||||
// 'timew <command> --help' should be treated the same as 'timew help
|
||||
// <command>'. Therefore, "--help" on the command line should always
|
||||
// become the command.
|
||||
else if (alreadyFoundCmd && (raw == "--help"))
|
||||
// 'timew <command> --help|-h' should be treated the same as 'timew help <command>'.
|
||||
// Therefore, '--help|-h' on the command line should always become the command.
|
||||
else if (alreadyFoundCmd && (raw == "--help" || raw == "-h"))
|
||||
{
|
||||
for (auto& b : _args) {
|
||||
if (b.hasTag("CMD"))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue