Enhancement - Aliases
- Moved alias mapping to Context. - Added Context::canonicalize to resolve aliases. - Added Context::loadAliases to reload on config file change. - Removed old alias processing from Cmd. - Doesn't work yet, but the data is loaded.
This commit is contained in:
@@ -65,8 +65,11 @@ public:
|
||||
void parse (std::vector <std::string>&, Cmd&, Task&, Sequence&, Subst&, Filter&);
|
||||
void clear ();
|
||||
|
||||
std::string canonicalize (const std::string&) const;
|
||||
|
||||
private:
|
||||
void loadCorrectConfigFile ();
|
||||
void loadAliases ();
|
||||
void autoFilter (Task&, Filter&);
|
||||
|
||||
public:
|
||||
@@ -81,7 +84,8 @@ public:
|
||||
std::string program;
|
||||
std::vector <std::string> args;
|
||||
Cmd cmd;
|
||||
std::vector <std::string> tagAdditions; // TODO This is redundant, remove.
|
||||
std::map <std::string, std::string> aliases;
|
||||
std::vector <std::string> tagAdditions;
|
||||
std::vector <std::string> tagRemovals;
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user