char cmd_str[1024] = "";
cli_profile_t *profile = NULL;
#ifndef WIN32
- char hfile[512] = "/tmp/fs_cli_history";
- char cfile[512] = "/etc/fs_cli.conf";
- char dft_cfile[512] = "/etc/fs_cli.conf";
+ char hfile[512] = "/etc/nbess7_cli_history";
+ char cfile[512] = "/etc/nbess7_cli.conf";
+ char dft_cfile[512] = "/etc/nbess7_cli.conf";
#else
- char hfile[512] = "fs_cli_history";
- char cfile[512] = "fs_cli.conf";
- char dft_cfile[512] = "fs_cli.conf";
+ char hfile[512] = "nbess7_cli_history";
+ char cfile[512] = "nbess7_cli.conf";
+ char dft_cfile[512] = "nbess7_cli.conf";
#endif
char *home = getenv("HOME");
+ char *term = getenv("TERM");
/* Vars for optargs */
int opt;
static struct option options[] = {
esl_set_string(input_text_color, profile->input_text_color);
esl_set_string(output_text_color, profile->output_text_color);
if (argv_host) {
- if (argv_port && profile->port != 8021) {
- snprintf(bare_prompt_str, sizeof(bare_prompt_str), "freeswitch@%s:%u@%s> ", profile->host, profile->port, profile->name);
+ if (argv_port && profile->port != 8821) {
+ snprintf(prompt_str, sizeof(prompt_str), PROMPT_PREFIX "@%s:%u@%s> ", profile->host, profile->port, profile->name);
} else {
- snprintf(bare_prompt_str, sizeof(bare_prompt_str), "freeswitch@%s@%s> ", profile->host, profile->name);
+ snprintf(prompt_str, sizeof(prompt_str), PROMPT_PREFIX "@%s@%s> ", profile->host, profile->name);
}
} else {
- snprintf(bare_prompt_str, sizeof(bare_prompt_str), "freeswitch@%s> ", profile->name);
+ snprintf(prompt_str, sizeof(prompt_str), PROMPT_PREFIX "@%s> ", profile->name);
}
bare_prompt_str_len = (int)strlen(bare_prompt_str);
- #ifdef WIN32
- snprintf(prompt_str, sizeof(prompt_str), "%s", bare_prompt_str); /* Not supporting this for now */
- #else
- snprintf(prompt_str, sizeof(prompt_str), "%s%s%s", prompt_color, bare_prompt_str, input_text_color);
- #endif
+ if (feature_level) {
+ snprintf(prompt_str, sizeof(prompt_str), "%s%s%s", prompt_color, bare_prompt_str, input_text_color);
+ } else {
+ snprintf(prompt_str, sizeof(prompt_str), "%s", bare_prompt_str);
+ }
connect:
connected = 0;
while (--loops > 0) {