From 7167ce41b61d2ba2cdb526777a4233eb84a3b66a Mon Sep 17 00:00:00 2001 From: Unit 193 Date: Sat, 6 Dec 2014 17:33:25 -0500 Subject: Imported Upstream version 2.99.6 --- .../sqlitestudiocli/commands/clicommandpwd.cpp | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.cpp (limited to 'SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.cpp') diff --git a/SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.cpp b/SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.cpp new file mode 100644 index 0000000..f96cae4 --- /dev/null +++ b/SQLiteStudio3/sqlitestudiocli/commands/clicommandpwd.cpp @@ -0,0 +1,28 @@ +#include "clicommandpwd.h" +#include "common/unused.h" +#include + +void CliCommandPwd::execute() +{ + QDir dir; + println(dir.absolutePath()); +} + +QString CliCommandPwd::shortHelp() const +{ + return tr("prints the current working directory"); +} + +QString CliCommandPwd::fullHelp() const +{ + return tr( + "This is the same as 'pwd' command on Unix systems and 'cd' command without arguments on Windows. " + "It prints current working directory. You can change the current working directory with %1 command " + "and you can also list contents of the current working directory with %2 command." + ).arg(cmdName("cd")).arg(cmdName("dir")); +} + +void CliCommandPwd::defineSyntax() +{ + syntax.setName("pwd"); +} -- cgit v1.2.3