Esempio n. 1
0
File: node.c Progetto: Agyar/lhnb
/*
!init_nodetest();
*/
void init_nodetest ()
{
	cli_add_command ("att_set", cmd_att_set, "");
	cli_add_command ("att_get", cmd_att_get, "");
	cli_add_command ("att_clear", cmd_att_clear, "");
	cli_add_command ("att_list", cmd_att_list, "");
}
Esempio n. 2
0
File: file.c Progetto: pscha/tines
/*
!init_file();
*/
void init_file ()
{
	cli_add_command ("save", cmd_save, "");
	cli_add_help ("save", "Saves the data");

	cli_add_command ("revert", cmd_revert, "");
	cli_add_help ("revert", "Revert to last saved version");
}
Esempio n. 3
0
File: state.c Progetto: pscha/tines
/*
!init_keepstate();
*/
void init_keepstate ()
{
	cli_add_command ("save_state", save_state_cmd, "");
	cli_add_help ("save_state",
				  "Saves a copy of the current tree and selected node in memory");
	cli_add_command ("restore_state", restore_state_cmd, "");
	cli_add_help ("restore_state",
				  "Restores the copy of the tree saved with save_state");
}
Esempio n. 4
0
/*
!init_tree_todo();
*/
void init_tree_todo ()
{
	cli_add_command ("toggle_todo", toggle_todo_cmd, "");
	cli_add_help ("toggle_todo",
				  "Toggles visiblity and usage of the checkbox for the currently active item.");
	cli_add_command ("toggle_done", toggle_done_cmd, "");
	cli_add_help ("toggle_done",
				  "Toggles visiblity and usage of the checkbox for the currently active item.");
}
Esempio n. 5
0
/*
!init_clipboard();
*/
void init_clipboard ()
{
	cli_add_command ("copy", copy_cmd, "");
	cli_add_help ("copy",
				  "Stores the current node, and it's subtree in the clipboard");
	cli_add_command ("cut", cut_cmd, "");
	cli_add_help ("cut",
				  "Moves the current node, and it's subtree to the clipboard");
	cli_add_command ("paste", paste_cmd, "");
	cli_add_help ("paste",
				  "Inserts the contents of the clipboard at the current position in the tree.");
}
Esempio n. 6
0
/*
!init_mem();
*/
void init_mem ()
{
#ifndef WIN32
	cli_add_command ("mem", mem_cmd, "");
	cli_add_help ("mem", "Reports memory usage of application");
#endif
}
Esempio n. 7
0
/*
!init_ui_cli();
*/
void init_ui_cli (void)
{
	static int inited = 0;

	if (!inited) {
		inited = 1;
		cli_precmd = pre_command;
		cli_add_command ("add", add, "<string>");
		cli_add_command ("ls", ls, "");

		cli_add_help("add","inserts an new entry at the current position");
		cli_add_command ("addc", addc, "<parent> <string>");
		cli_add_help("addc","inserts a new entry under the node named parent, with the text og string");
		cli_add_command ("cd", cd, "<path>");
		cli_add_command ("pwd", pwd, "");
		cli_add_help ("pwd", "echoes the current path");
	}
}
Esempio n. 8
0
/*
!init_quit();
*/
void init_quit(){
	cli_add_command("quit",cmd_quit,"");
	cli_add_help("quit","quits tines, no questions asked");
	cli_add_command("q",cmd_quit,"");
	cli_add_help("q","quits tines, no questions asked");
}
Esempio n. 9
0
void init_ui_binding ()
{
	cli_add_command ("bind", ui_bind_cmd, "<key> <action> [parameter]");
	cli_add_help ("bind",
				  "Binds the action, to the specified key, subsequent actions my be bound by using the virtual key '..' thus chaining them together into a small script.");
	cli_add_command ("context", ui_context_cmd, "<context>");
	cli_add_help ("context",
				  "Changes context, context may be one of 'main', 'lineedit', 'nodeedit', 'confirm' or any other userdefined context.");

/* dummy commands to show the 'builtins' */
/*	cli_add_command ("backspace", dummy_cmd, "");
	cli_add_help ("backspace", "erase the preceding character");
	cli_add_command ("delete", dummy_cmd, "");
	cli_add_help ("delete", "erase the following character");

	cli_add_command ("down", dummy_cmd, "");
	cli_add_command ("left", dummy_cmd, "");
	cli_add_command ("right", dummy_cmd, "");
	cli_add_command ("up", dummy_cmd, "");
	cli_add_help ("down", "moves the cursor or selection down");
	cli_add_help ("left", "moves the cursor or selection left");
	cli_add_help ("right", "moves the cursor or selection right");
	cli_add_help ("up", "moves the cursor or selection up");

	cli_add_command ("bkill_word", dummy_cmd, "");
	cli_add_command ("kill_word", dummy_cmd, "");
	cli_add_help ("bkill_word", "erases the preceding word");
	cli_add_help ("bkill_word", "erases the following word");

	cli_add_command ("bol", dummy_cmd, "");
	cli_add_help ("bol", "move cursor to beginning of line");

	cli_add_command ("top", dummy_cmd, "");
	cli_add_command ("bottom", dummy_cmd, "");
	cli_add_help ("top", "move to the topmost sibling of the current entry");
	cli_add_help ("bottom",
				  "move to the bottommost sibling of the current entry");

	cli_add_command ("bskipword", dummy_cmd, "");
	cli_add_command ("cancel", dummy_cmd, "");

	cli_add_command ("complete", dummy_cmd, "");
	cli_add_help ("complete",
				  "output possible completions of entered command or variable");

	cli_add_command ("confirm", dummy_cmd, "");
	cli_add_help ("confirm",
				  "confirm the question posed, (used in dialogs asking for the users' consent)");


	cli_add_command ("eol", dummy_cmd, "");
	cli_add_help ("eol", "move to the end of the line");

	cli_add_command ("ignore", dummy_cmd, "");

	cli_add_command ("join", dummy_cmd, "");
	cli_add_command ("split", dummy_cmd, "");

	cli_add_help ("join",
				  "join the currently edited node with the following sibling");
	cli_add_help ("split",
				  "split the currently edited node at the cursor location");

	cli_add_command ("kill_line", dummy_cmd, "");
	cli_add_help ("kill_line", "erase the currently edited line");

	cli_add_command ("kill_to_bol", dummy_cmd, "");
	cli_add_command ("kill_to_eol", dummy_cmd, "");

	cli_add_command ("pagedown", dummy_cmd, "");
	cli_add_command ("pageup", dummy_cmd, "");

	cli_add_command ("skipword", dummy_cmd, "");

	cli_add_command ("unbound", dummy_cmd, "");
	cli_add_help ("unbound",
				  "give a message indicating that the pressed key is not bound in the current context");
*/
}
Esempio n. 10
0
/*
!init_file_binary();
*/
void init_file_binary ()
{
	cli_add_command ("export_binary", export_binary, "<filename>");
	cli_add_command ("import_binary", import_binary, "<filename>");
}
Esempio n. 11
0
/*
!init_search();
*/
void init_search ()
{
	cli_add_command ("search",search,"[-b|-f] <string>");
	cli_add_help("search","searches either -b(ackwards) or -f(orwards) in the tree for the next entry with a substring matching the specified string");
}
Esempio n. 12
0
/*
!init_stats();
*/
void init_stats ()
{
	cli_add_command ("stats", stats_cmd, "");
	cli_add_help ("stats",
				  "Reports number of items, leaf items and total number of words in tree");
}
Esempio n. 13
0
File: cli.c Progetto: Agyar/lhnb
static void init_cli (void)
{
	cli_add_command ("?", help, "? - this listing");
	cli_add_command ("show_vars", vars, "show all variables");
	inited = 1;
}
Esempio n. 14
0
/*
!init_cal();
*/
void init_cal(){
	cli_add_command ("insert_cal", insert_cal, "<month> <year>");
}