X-Git-Url: http://g0dil.de/git?a=blobdiff_plain;f=Console%2FExecutor.hh;h=92a2dfe218bfd8c7dfe367294ade2b8094276aee;hb=ca70e274a556bf217f3f4c7b12e0fad2a7cd4853;hp=81dafd9468b3e77e79ee630b98fec9dd75ced674;hpb=be33ff96c5b89738694da272d8610564cce48bfb;p=senf.git diff --git a/Console/Executor.hh b/Console/Executor.hh index 81dafd9..92a2dfe 100644 --- a/Console/Executor.hh +++ b/Console/Executor.hh @@ -86,12 +86,30 @@ namespace console { Same as execute(). */ DirectoryNode & cwd() const; ///< Current working directory + bool autocd() const; ///< Get current autocd status + /**< if autocd is enabled, specifying a directory name as + command will cd to that directory. Disabled by + default (but enabled automatically by the interactive + console). */ + Executor & autocd(bool v); ///< Set autocd status + /**< \see autocd() */ + + bool autocomplete() const; ///< Get current autocomplete status + /**< if autocomplete is enabled, path components which can + be uniquely completed will be completed + automatically. Disabled by default (but enabled + automatically by the interactive console) void + autocomplete(bool v). */ + + Executor & autocomplete(bool v); ///< Set autocomplete status + /**< \see autocomplete() */ + protected: private: GenericNode & traverseNode(ParseCommandInfo::argument_value_type const & path); + GenericNode & traverseCommand(ParseCommandInfo::CommandPathRange const & path); DirectoryNode & traverseDirectory(ParseCommandInfo::argument_value_type const & path); - CommandNode & traverseCommand(ParseCommandInfo::CommandPathRange const & path); struct InvalidPathException {}; struct InvalidDirectoryException {}; @@ -101,6 +119,9 @@ namespace console { DirectoryNode::weak_ptr oldCwd_; typedef std::vector DirStack; DirStack dirstack_; + + bool autocd_; + bool autocomplete_; };