diff --git a/src/bottles/activate.cpp b/src/bottles/activate.cpp index 7062d0b..a446e73 100644 --- a/src/bottles/activate.cpp +++ b/src/bottles/activate.cpp @@ -8,5 +8,5 @@ using namespace std; void cellar::bottles::switch_active_bottle(int argc, vector argv) { - cout << argc << endl; + cout << argv[0] << endl; } diff --git a/src/cellar.cpp b/src/cellar.cpp index c87b81c..c8d24b8 100644 --- a/src/cellar.cpp +++ b/src/cellar.cpp @@ -47,7 +47,14 @@ int main(int argc, char* argv[]) { string usercmd = command.getValue(); if (commands::command_map.count(usercmd) > 0) { - vector subargv = subargs.getValue(); + vector subargv; + stringstream sstr; + sstr << "cellar "; + sstr << usercmd; + subargv.push_back(sstr.str()); + for (auto item : subargs.getValue()) { + subargv.push_back(item); + } commands::command_map[usercmd](subargv.size(), subargv); } else { cerr << "invalid command: " << usercmd << endl;