コード例 #1
0
ファイル: file.c プロジェクト: 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");
}
コード例 #2
0
ファイル: state.c プロジェクト: 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");
}
コード例 #3
0
ファイル: tree_todo.c プロジェクト: Backgammon-/hnb
/*
!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.");
}
コード例 #4
0
ファイル: clipboard.c プロジェクト: Backgammon-/hnb
/*
!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.");
}
コード例 #5
0
ファイル: statcmds.c プロジェクト: pscha/tines
/*
!init_mem();
*/
void init_mem ()
{
#ifndef WIN32
	cli_add_command ("mem", mem_cmd, "");
	cli_add_help ("mem", "Reports memory usage of application");
#endif
}
コード例 #6
0
ファイル: ui_cli.c プロジェクト: Backgammon-/hnb
/*
!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");
	}
}
コード例 #7
0
ファイル: evilloop.c プロジェクト: pscha/tines
/*
!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");
}
コード例 #8
0
ファイル: ui_binding.c プロジェクト: Agyar/lhnb
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");
*/
}
コード例 #9
0
ファイル: search.c プロジェクト: Backgammon-/hnb
/*
!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");
}
コード例 #10
0
ファイル: statcmds.c プロジェクト: pscha/tines
/*
!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");
}