summaryrefslogblamecommitdiff
path: root/Source/Applications/Shell/Applets/pwd.cpp
blob: 4b27eb07ac35f8b365869dc57c7e58d3df8fa9bb (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                                                                                
#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);