Commands - info

- When no command is specified, assume 'info' command.
This commit is contained in:
Paul Beckingham 2011-06-26 00:43:18 -04:00
parent c9cc43dc5f
commit 91e5a5e02e
3 changed files with 8 additions and 8 deletions

View file

@ -441,9 +441,10 @@ void Arguments::categorize ()
// then invoke the default command. // then invoke the default command.
if (!found_command) if (!found_command)
{ {
if (found_non_sequence) if (!found_sequence)
{ {
// TODO Invoke the default command. // TODO Invoke the default command.
std::cout << "DEFAULT COMMAND\n";
/* /*
// Apply overrides, if any. // Apply overrides, if any.
std::string defaultCommand = config.get ("default.command"); std::string defaultCommand = config.get ("default.command");
@ -471,12 +472,10 @@ void Arguments::categorize ()
// If the command "task 123" is entered, but with no modifier arguments, // If the command "task 123" is entered, but with no modifier arguments,
// then the actual command is assumed to be "info". // then the actual command is assumed to be "info".
else if (!found_non_sequence && else if (!found_non_sequence)
found_sequence)
{ {
// TODO Invoke the info command. context.header (STRING_ASSUME_INFO);
std::cout << STRING_ASSUME_INFO << "\n"; push_back (std::make_pair ("information", "command"));
// parseCmd.command = "info";
} }
} }
} }

View file

@ -150,7 +150,8 @@ int CmdCustom::execute (std::string& output)
maxlines -= (context.verbose ("blank") ? 1 : 0) maxlines -= (context.verbose ("blank") ? 1 : 0)
+ table_header + table_header
+ context.headers.size () + context.headers.size ()
+ context.footnotes.size (); + context.footnotes.size ()
+ 1; // "X tasks shown ..."
// Render. // Render.
// TODO Consider rc.verbose // TODO Consider rc.verbose

View file

@ -247,7 +247,7 @@
#define STRING_NO_HOME "Could not read home directory from the passwd file." #define STRING_NO_HOME "Could not read home directory from the passwd file."
#define STRING_TAGS_NO_COMMAS "Tags are not permitted to contain commas." #define STRING_TAGS_NO_COMMAS "Tags are not permitted to contain commas."
#define STRING_TRIVIAL_INPUT "You must specify a command, or a task ID to modify." #define STRING_TRIVIAL_INPUT "You must specify a command, or a task ID to modify."
#define STRING_ASSUME_INFO "No command - assuming 'info'" #define STRING_ASSUME_INFO "No command specified - assuming 'information'"
#define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection." #define STRING_INFINITE_LOOP "Terminated substitution because more than {1} changes were made - infinite loop protection."
// Feedback // Feedback