SETUP() { view_setup(&lwin); view_setup(&rwin); curr_view = &lwin; other_view = &rwin; cfg.cd_path = strdup(""); cfg.fuse_home = strdup(""); cfg.slow_fs_list = strdup(""); cfg.use_system_calls = 1; #ifndef _WIN32 replace_string(&cfg.shell, "/bin/sh"); #else replace_string(&cfg.shell, "cmd"); #endif stats_update_shell_type(cfg.shell); init_commands(); add_builtin_commands(commands, ARRAY_LEN(commands)); called = 0; undo_setup(); saved_cwd = save_cwd(); }
SETUP() { lwin.list_rows = 0; curr_view = &lwin; init_commands(); add_builtin_commands(commands, ARRAY_LEN(commands)); }
void init_menu_mode(void) { int ret_code; ret_code = add_cmds(builtin_cmds, ARRAY_LEN(builtin_cmds), MENU_MODE); assert(ret_code == 0); (void)ret_code; set_def_handler(MENU_MODE, key_handler); init_cmds(0, &cmds_conf); add_builtin_commands((const cmd_add_t *)&commands, ARRAY_LEN(commands)); }
void menu_init_mode(void) { int ret_code; ret_code = vle_keys_add(builtin_cmds, ARRAY_LEN(builtin_cmds), MENU_MODE); assert(ret_code == 0); (void)ret_code; vle_keys_set_def_handler(MENU_MODE, &key_handler); /* Double initialization can happen in tests. */ if(cmds_conf.inner == NULL) { init_cmds(0, &cmds_conf); add_builtin_commands((const cmd_add_t *)&commands, ARRAY_LEN(commands)); } }
void init_commands(void) { if(cmds_conf.inner != NULL) { init_cmds(1, &cmds_conf); return; } /* We get here when init_commands() is called the first time. */ init_cmds(1, &cmds_conf); add_builtin_commands((const cmd_add_t *)&cmds_list, cmds_list_size); /* Initialize modules used by this one. */ init_bracket_notation(); init_variables(); vle_aucmd_set_expand_hook(&pattern_expand_hook); }
SETUP() { static const cmd_add_t move = { .name = "move", .abbr = "m", .id = -1, .descr = "descr", .flags = HAS_EMARK | HAS_RANGE | HAS_BG_FLAG | HAS_QUOTED_ARGS | HAS_QMARK_NO_ARGS | HAS_SELECTION_SCOPE, .handler = &move_cmd, .min_args = 0, .max_args = NOT_DEF, }; add_builtin_commands(&move, 1); assert_success(execute_cmd("command udf a")); assert_success(execute_cmd("command mkcd! a")); assert_success(execute_cmd("command mkcd? a")); } static int move_cmd(const cmd_info_t *cmd_info) { move_cmd_called = 1; return 0; }
SETUP() { add_builtin_commands(commands, ARRAY_LEN(commands)); }
static void setup(void) { add_builtin_commands(commands, ARRAY_LEN(commands)); }
SETUP() { add_builtin_commands(commands, ARRAY_LEN(commands)); cmds_conf.skip_at_beginning = &skip_at_beginning; }