blob: 4b27eb07ac35f8b365869dc57c7e58d3df8fa9bb (
plain) (
tree)
|
|
#include <App/ShellApp.proto.h>
#include <Binding/FSNode.class.h>
class pwd : public ShellApp {
public:
pwd() : ShellApp("pwd", "Shows the current directory") {
addFlag("f", "frugal", "Do not show 'Current directory: ' prefix", FT_BOOL, "");
}
int run() {
if (!bFlag("frugal")) outvt << "Current directory: ";
outvt << FS::cwdNode().path() << ENDL;
}
};
APP(pwd);
|