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:
Paul Beckingham 2009-06-23 17:38:58 -04:00
parent b6bc72c449
commit 78afa4e110
4 changed files with 44 additions and 28 deletions

View file

@ -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: