diff options
author | Alexis211 <alexis211@gmail.com> | 2009-12-25 10:17:25 +0100 |
---|---|---|
committer | Alexis211 <alexis211@gmail.com> | 2009-12-25 10:17:25 +0100 |
commit | 6994f34953fac9462e899d0b2c7af64e21c92a1e (patch) | |
tree | d4b1d10a4af6f630d168791d56fef6993ed2cb22 /Source/Applications/Shell/Applets | |
parent | c4cb32b8534610a92931d825efefd6892e8412af (diff) | |
download | Melon-6994f34953fac9462e899d0b2c7af64e21c92a1e.tar.gz Melon-6994f34953fac9462e899d0b2c7af64e21c92a1e.zip |
More work
Diffstat (limited to 'Source/Applications/Shell/Applets')
-rw-r--r-- | Source/Applications/Shell/Applets/pwd.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
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 <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); |