|
|
@@ -31,7 +31,7 @@ std::string AppContext::GetAbsolutePath(const std::string &dir, const std::strin
|
|
|
return ss.str();
|
|
|
}
|
|
|
|
|
|
-AppContext::AppContext(char **av, char **en)
|
|
|
+AppContext::AppContext(char **av)
|
|
|
{
|
|
|
const std::string appName = *av;
|
|
|
vector<string> args = ::GetArgs(av +1);
|
|
|
@@ -45,6 +45,7 @@ AppContext::AppContext(char **av, char **en)
|
|
|
bool historyOnly = false;
|
|
|
bool flush = false;
|
|
|
bool getHistoryFile = false;
|
|
|
+ bool verbose = false;
|
|
|
string histDir;
|
|
|
std::stringstream ss ("cd_");
|
|
|
ss << "cd_" << getppid() << ".hist";
|
|
|
@@ -69,6 +70,8 @@ AppContext::AppContext(char **av, char **en)
|
|
|
historyOnly = true;
|
|
|
else if (*i == "--flush" || *i == "-F")
|
|
|
flush = true;
|
|
|
+ else if (*i == "--verbose" || *i == "-v")
|
|
|
+ verbose = true;
|
|
|
else if (*i == "--help")
|
|
|
usageOnly = true;
|
|
|
else if (path.empty())
|
|
|
@@ -83,7 +86,7 @@ AppContext::AppContext(char **av, char **en)
|
|
|
path = getenv("HOME");
|
|
|
// FIXME else wtf
|
|
|
}
|
|
|
- fArgs = AppContext::Args(usageOnly, historyOnly, getHistoryFile, flush, histDir.empty() ? "/tmp/" : histDir, histFile.empty() ? defaultHistFile : histFile, path);
|
|
|
+ fArgs = AppContext::Args(usageOnly, historyOnly, getHistoryFile, flush, verbose, histDir.empty() ? "/tmp/" : histDir, histFile.empty() ? defaultHistFile : histFile, path);
|
|
|
}
|
|
|
|
|
|
bool AppContext::IsReadOnly() const
|