Line data Source code
1 : /**
2 : * @file
3 : *
4 : * @brief
5 : *
6 : * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
7 : */
8 :
9 : #ifndef SHELL_HPP
10 : #define SHELL_HPP
11 :
12 : #include <command.hpp>
13 :
14 : #include <kdb.hpp>
15 :
16 : class ShellCommand : public Command
17 : {
18 : kdb::KDB kdb;
19 : std::string supportedCommands;
20 :
21 : public:
22 : ShellCommand ();
23 : ~ShellCommand ();
24 :
25 1 : virtual std::string getShortOptions () override
26 : {
27 3 : return "";
28 : }
29 :
30 1 : virtual std::string getSynopsis () override
31 : {
32 3 : return "";
33 : }
34 :
35 79 : virtual std::string getShortHelpText () override
36 : {
37 237 : return "Start a kdb shell.";
38 : }
39 :
40 1 : virtual std::string getLongHelpText () override
41 : {
42 : return "Use an interactive mode to view or edit\n"
43 : "the key database.\n"
44 : "\n"
45 2 : "Supported commands are:\n" +
46 : supportedCommands +
47 : "\n"
48 : "Read the API docu\n"
49 : "to see what these commands are doing.\n"
50 : "\n"
51 : "An internal current key and keyset assist\n"
52 : "to build up data structures which can be\n"
53 2 : "applied to the key database.";
54 : }
55 :
56 : virtual int execute (Cmdline const & cmdline) override;
57 : };
58 :
59 : #endif
|