Commit Graph

13 Commits

Author SHA1 Message Date
Riccardo Spagni ab594cfee9
Merge pull request #2159
6955976b Add various readline related fixes (Jethro Grassie)
2017-07-19 11:52:27 +02:00
Jethro Grassie 6955976b2d
Add various readline related fixes
- Add missing unbind key
- Fix colored messages
- Add command completion
- Preserve last command input
- Fix cursor position issues
- Fix trailing whitespace in commands
- Synchronize set_prompt
2017-07-09 09:50:04 -04:00
Jethro Grassie 6a23cd07aa
Add notification on stop 2017-07-07 07:59:07 -04:00
Riccardo Spagni 7995dcff94
Merge pull request #2112
76043b17 monero-wallet-cli: hang on exit in readline code (#2117) (moneromooo-monero)
a73a42a6 monero-wallet-cli: hang on exit in readline code (#2117) (moneromooo-monero)
be9d4f04 Fix multiline wallet cli output with readline (Jethro Grassie)
2017-07-03 12:27:14 +02:00
moneromooo-monero 76043b17fd
monero-wallet-cli: hang on exit in readline code (#2117)
readline_buffer: move a local to local scope

Also limit the select fd limit to what we use

Signed-off-by: Jethro Grassie <jtg@xtrabass.com>
2017-06-28 07:54:29 -04:00
moneromooo-monero a73a42a6b0
monero-wallet-cli: hang on exit in readline code (#2117)
readline_buffer: fix start/stop threads being starved by process

process could run for quite some time re-acquiring the process
lock, leaving start/stop starving. Yielding after unlock in
process is much better but doesn't seem to be enough to reliably
yield, so we sleep for a millisecond, which should be transparent
for user input anyway.

Signed-off-by: Jethro Grassie <jtg@xtrabass.com>
2017-06-28 07:54:20 -04:00
Jethro Grassie be9d4f0411
Fix multiline wallet cli output with readline
monero-wallet-cli commands which have multine output sometimes causes
issues with the readline support. This patch fixes show_transfers,
payments and incoming_transfers.
2017-06-25 10:48:02 -04:00
Jethro Grassie fdccf7e6c3
Add readline improvements
Color prompt now working and no reprompting on exit command.
2017-06-24 07:34:56 -04:00
Riccardo Spagni 0c6ea4f8a6
Merge pull request #2111
8261ba69 readline_buffer: fix busy wait (moneromooo-monero)
2017-06-24 12:48:37 +02:00
moneromooo-monero 8261ba69e6
readline_buffer: fix busy wait
It'd eat up a core constantly, due to spending its time jumping
back and forth between userland and kernel. We now wait for up
to a millisecond in kernel, which will be transparent to the user
and drop to idle most of the time.
2017-06-23 13:21:50 +01:00
moneromooo-monero 21b939e1e6
readline: fix invalid memory access
m_cout_buf was not initialized
2017-06-21 17:33:47 +01:00
moneromooo-monero 5f8f290505
readline_buffer: add a couple const 2017-06-21 17:33:30 +01:00
jethro e1f3dfccc8 Add readline support to cli
This PR adds readline support to the daemon and monero-wallet-cli. Only
GNU readline is supported (e.g. not libedit) and there are cmake checks
to ensure this.

There is a cmake variable, Readline_ROOT_DIR that can specify a
directory to find readline, otherwise some default paths are searched.

There is also a cmake option, USE_READLINE, that defaults to ON. If set
to ON, if readline is not found, the build continues but without
readline support.

One negative side effect of using readline is that the color prompt in
the wallet-cli now has no color and just uses terminal default. I know
how to fix this but it's quite a big change so will tackle another time.
2017-06-18 10:08:37 -04:00