mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
CLI
- Converted _program from std::string to A.
This commit is contained in:
parent
b3b509eabe
commit
e5780474da
2 changed files with 9 additions and 6 deletions
13
src/CLI.cpp
13
src/CLI.cpp
|
@ -204,8 +204,7 @@ const std::string A::dump () const
|
||||||
|
|
||||||
////////////////////////////////////////////////////////////////////////////////
|
////////////////////////////////////////////////////////////////////////////////
|
||||||
CLI::CLI ()
|
CLI::CLI ()
|
||||||
: _program ("")
|
: _rc ("")
|
||||||
, _rc ("")
|
|
||||||
, _command ("")
|
, _command ("")
|
||||||
, _readOnly (false)
|
, _readOnly (false)
|
||||||
{
|
{
|
||||||
|
@ -233,7 +232,7 @@ void CLI::entity (const std::string& name, const std::string& value)
|
||||||
void CLI::initialize (int argc, const char** argv)
|
void CLI::initialize (int argc, const char** argv)
|
||||||
{
|
{
|
||||||
// Clean what needs to be cleaned. Everything in this case.
|
// Clean what needs to be cleaned. Everything in this case.
|
||||||
_program = "";
|
_program.clear ();
|
||||||
_original_args.clear ();
|
_original_args.clear ();
|
||||||
_args.clear ();
|
_args.clear ();
|
||||||
_rc = "";
|
_rc = "";
|
||||||
|
@ -243,7 +242,10 @@ void CLI::initialize (int argc, const char** argv)
|
||||||
_filter.clear ();
|
_filter.clear ();
|
||||||
_modifications.clear ();
|
_modifications.clear ();
|
||||||
|
|
||||||
_program = argv[0];
|
_program._name = "arg";
|
||||||
|
_program.attribute ("raw", argv[0]);
|
||||||
|
_program.tag ("BINARY");
|
||||||
|
|
||||||
for (int i = 1; i < argc; ++i)
|
for (int i = 1; i < argc; ++i)
|
||||||
_original_args.push_back (argv[i]);
|
_original_args.push_back (argv[i]);
|
||||||
|
|
||||||
|
@ -530,7 +532,8 @@ void CLI::unsweetenTags ()
|
||||||
void CLI::dump (const std::string& label) const
|
void CLI::dump (const std::string& label) const
|
||||||
{
|
{
|
||||||
std::cout << label << "\n"
|
std::cout << label << "\n"
|
||||||
<< " _program " << _program << "\n";
|
<< " _program\n"
|
||||||
|
<< " " << _program.dump () << "\n";
|
||||||
|
|
||||||
std::cout << " _original_args ";
|
std::cout << " _original_args ";
|
||||||
Color colorOrigArgs ("gray10 on gray4");
|
Color colorOrigArgs ("gray10 on gray4");
|
||||||
|
|
|
@ -82,7 +82,7 @@ private:
|
||||||
public:
|
public:
|
||||||
std::multimap <std::string, std::string> _entities;
|
std::multimap <std::string, std::string> _entities;
|
||||||
std::map <std::string, std::string> _aliases;
|
std::map <std::string, std::string> _aliases;
|
||||||
std::string _program;
|
A _program;
|
||||||
std::vector <std::string> _original_args;
|
std::vector <std::string> _original_args;
|
||||||
std::vector <A> _args;
|
std::vector <A> _args;
|
||||||
std::string _rc;
|
std::string _rc;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue