int init_status(config_t *config) { inside_screen = !is_null_or_empty(env_get(SCREEN_ENVVAR)); inside_tmux = !is_null_or_empty(env_get(TMUX_ENVVAR)); load_def_values(&curr_stats, config); determine_fuse_umount_cmd(&curr_stats); set_gtk_available(&curr_stats); curr_stats.exec_env_type = get_exec_env_type(); stats_update_shell_type(config->shell); return reset_status(config); }
int stats_init(config_t *config) { inside_screen = !is_null_or_empty(env_get(SCREEN_ENVVAR)); inside_tmux = !is_null_or_empty(env_get(TMUX_ENVVAR)); load_def_values(&curr_stats, config); determine_fuse_umount_cmd(&curr_stats); set_gtk_available(&curr_stats); curr_stats.exec_env_type = get_exec_env_type(); stats_update_shell_type(config->shell); (void)hist_init(&curr_stats.cmd_hist, config->history_len); (void)hist_init(&curr_stats.search_hist, config->history_len); (void)hist_init(&curr_stats.prompt_hist, config->history_len); (void)hist_init(&curr_stats.filter_hist, config->history_len); hists_resize(config->history_len); return stats_reset(config); }