diff options
author | John Wiegley <johnw@newartisans.com> | 2019-01-14 17:30:09 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-01-14 17:30:09 -0800 |
commit | bec7d3e82c52fd331d73bc9b2006e0ec86a23af9 (patch) | |
tree | 7d0c769098f5b69dd80b24c8a831d7255d70a71c /src/main.cc | |
parent | 88fd3a38b9456998c59dd49bb225504156274c83 (diff) | |
parent | b29d07ac62a9e7df427ab71a789cfcc96de9f4db (diff) | |
download | ledger-bec7d3e82c52fd331d73bc9b2006e0ec86a23af9.tar.gz ledger-bec7d3e82c52fd331d73bc9b2006e0ec86a23af9.tar.bz2 ledger-bec7d3e82c52fd331d73bc9b2006e0ec86a23af9.zip |
Merge pull request #1705 from scfc/move-have-edit
Use HAVE_EDIT only in main.cc
Diffstat (limited to 'src/main.cc')
-rw-r--r-- | src/main.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.cc b/src/main.cc index c8b9ec3a..4348e8a6 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1,5 +1,5 @@ /* - * Copyright (c) 2003-2018, John Wiegley. All rights reserved. + * Copyright (c) 2003-2019, John Wiegley. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are @@ -35,6 +35,10 @@ // was moved there for the sake of clarity here #include "session.h" +#ifdef HAVE_EDIT +#include <editline/readline.h> +#endif + using namespace ledger; #if HAVE_BOOST_PYTHON @@ -128,13 +132,9 @@ int main(int argc, char * argv[], char * envp[]) bool exit_loop = false; -#if HAVE_EDIT - +#ifdef HAVE_EDIT rl_readline_name = const_cast<char *>("Ledger"); -#if 0 - // jww (2009-02-05): NYI - rl_attempted_completion_function = ledger_completion; -#endif + // TODO: rl_attempted_completion_function = ledger_completion; while (char * p = readline(global_scope->prompt_string())) { char * expansion = NULL; @@ -173,7 +173,7 @@ int main(int argc, char * argv[], char * envp[]) global_scope->execute_command_wrapper(split_arguments(p), true); } -#if HAVE_EDIT +#ifdef HAVE_EDIT if (expansion) std::free(expansion); std::free(p); |