Skip to content

Commit

Permalink
Make readline also work on windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco van Wieringen committed Jan 29, 2014
1 parent b9826e0 commit d635888
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/console/console.c
Expand Up @@ -1084,6 +1084,7 @@ int main(int argc, char *argv[])
bool test_config = false;
JCR jcr;
TLS_CONTEXT *tls_ctx = NULL;
POOL_MEM history_file;
utime_t heart_beat;

errmsg_len = sizeof(errmsg);
Expand Down Expand Up @@ -1327,11 +1328,17 @@ int main(int argc, char *argv[])

sendit(_("Enter a period to cancel a command.\n"));

#if defined(HAVE_WIN32)
/*
* Read/Update history file if USERPROFILE exists
*/
char *env = getenv("USERPROFILE");
#else
/*
* Read/Update history file if HOME exists
*/
POOL_MEM history_file;
char *env = getenv("HOME");
#endif

/*
* Run commands in ~/.bconsolerc if any
Expand Down

0 comments on commit d635888

Please sign in to comment.