From 6994f34953fac9462e899d0b2c7af64e21c92a1e Mon Sep 17 00:00:00 2001 From: Alexis211 Date: Fri, 25 Dec 2009 10:17:25 +0100 Subject: More work --- Source/Applications/Shell/Applets/pwd.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 Source/Applications/Shell/Applets/pwd.cpp (limited to 'Source/Applications/Shell/Applets') diff --git a/Source/Applications/Shell/Applets/pwd.cpp b/Source/Applications/Shell/Applets/pwd.cpp new file mode 100644 index 0000000..4b27eb0 --- /dev/null +++ b/Source/Applications/Shell/Applets/pwd.cpp @@ -0,0 +1,15 @@ +#include +#include + +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); -- cgit v1.2.3