Commit Graph

320 Commits

Author SHA1 Message Date
Joachim Nilsson
7355f56d25 Update ChangeLog(s) and bump version for v1.16.1 release
New ABI version 1.0.1

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-06-07 12:04:01 +02:00
Joachim Nilsson
5496152d51 Rephrase section introducing Jush, the stupid UNIX shell
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-06-01 17:24:59 +02:00
Joachim Nilsson
13f8d5f69c
Merge pull request #32 from abitmore/search-end-cleanup
Cleanup el_intr_pending in h_search_end()
2019-05-08 17:11:02 +02:00
Joachim Nilsson
c2b65646ea Revert "Fi #31: Aborting i-search with Ctrl-C should not generate signal"
This reverts commit e2c3b41d9a.
2019-05-08 17:10:21 +02:00
Joachim Nilsson
e2c3b41d9a Fi #31: Aborting i-search with Ctrl-C should not generate signal
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-08 17:04:15 +02:00
Joachim Nilsson
4a17180d37 Add SIGINT notification to cli example, for debugging
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-08 17:03:49 +02:00
Joachim Nilsson
3e046cafd2 Clear line on failed Ctrl-R operation
The Ctrl-R search prompt and failed search text may be longer than
the regular CLI prompt.  This patch clears the line to remove any
lingering artefacts.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-08 16:57:40 +02:00
Joachim Nilsson
0e493addab Fix #30: Ctrl-R with empty search string clears screen
The screen should only be cleared on Ctrl-L *and* empty regular line,
not when searching with an empty string.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-08 16:55:33 +02:00
abitmore
842bd67dd4 Cleanup el_intr_pending in h_search_end()
Fixes an issue when user pressed Ctrl+C when searching.
2019-05-08 07:51:13 -04:00
Joachim Nilsson
0eb8f228f7
Merge pull request #29 from abitmore/rl_set_getc_func
Add rl_set_getc_func()
2019-05-08 10:48:39 +02:00
abitmore
8f6d724e30 Add rl_set_getc_func()
So it's possible to install another implementation of rl_getc() function.
2019-05-07 17:58:06 -04:00
Joachim Nilsson
ee176c80d7 Only display return from readline() when there's something to show.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-06 01:20:46 +02:00
Joachim Nilsson
979f05a5eb Follow-up to a4b67d2: Ctrl-L redisplay line when not on empty line
Like Ctrl-D, when on an empty line we clear the screen, when editing a
garbled line we refresh the line.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-06 00:54:57 +02:00
Joachim Nilsson
c95d25731d Always use enums for el_status_t return values
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-06 00:54:17 +02:00
Joachim Nilsson
61d40f406f examples: Catch SIGINT instead of mapping Ctrl-C, use default Ctrl-D
We want Ctrl-C to work as in Bash, so let's just catch SIGINT (and do
nothing).  Also, the default Ctrl-D handler does what we want, i.e.
exit the CLI when we're on an empty line.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-05-06 00:52:13 +02:00
Joachim Nilsson
385cd77e9b Merge branch 'abitmore-patch-1' 2019-05-03 17:13:39 +02:00
Abit
448a3dac08
Avoid continuously duplicate commands in history
When adding a command to history, if CONFIG_UNIQUE_HISTORY is defined, always compare current command with the last entry in history.
2019-05-03 16:54:25 +02:00
Joachim Nilsson
7506826ac7 debian: libeditline1 does not have any shlib deps.
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-27 15:44:30 +02:00
Joachim Nilsson
ec7f752095 debian: Add missing pkg-cconfig .pc file to -dev package
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-27 15:43:56 +02:00
Joachim Nilsson
959a9e7199 Prepare for debian v1.16.1 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-27 15:01:28 +02:00
Joachim Nilsson
397ac9dd56 Update ChangeLog with latest fixes
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-27 12:47:20 +02:00
Joachim Nilsson
e58868bec1 Mention jush as another example of Editline
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-27 12:46:59 +02:00
Joachim Nilsson
650d0f15c6 Correction, this version of the library stems from Minix 2
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-27 12:46:31 +02:00
Joachim Nilsson
2aee394b44 Major update of man page, exand on APIs and history of library
- Convert from obtruse troff syntax to simpler mdoc format
- Add history APIs, most relevant extra APIs available
- Expand on the history of the library
- Rewrite some sections for accessiblilty

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-27 12:32:58 +02:00
Joachim Nilsson
dd1af360c3 Merge branch 'dtzWill-fix/narrow-terms' 2019-04-27 09:11:19 +02:00
Will Dietz
8660aef4b7 editline: fix behavior when tty is narrower than column width
Fixes crash when dividing by the number of columns,
which was computed as zero in this situation.

Instead, always have at least one "column" even if it wraps.
2019-04-26 13:30:15 -05:00
Joachim Nilsson
6a4d77ca69 Update ChangeLog with latest fixes
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-07 12:46:23 +02:00
Joachim Nilsson
0b554cf8c8 Bump version for v1.16.1 release cycle
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-04-07 12:46:01 +02:00
Joachim Nilsson
8f5a5da754 examples/fileman.c: Further code cleanup and simplification
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-12-31 22:51:39 +01:00
Joachim Nilsson
a237e39181 examples/fileman.c: Refactor and cleanup
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-12-31 22:49:28 +01:00
Joachim Nilsson
3cb74b6d87 examples/fileman.c: Remove unnecessary code
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-12-31 22:41:15 +01:00
Joachim Nilsson
5c8429dcee examples/fileman.c: Deregister
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-12-31 22:39:20 +01:00
Joachim Nilsson
8566eb8384 examples/fileman.c: Reindent to project coding style
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-12-31 22:30:45 +01:00
Joachim Nilsson
8e34e4e417
Merge pull request #23 from LnL7/redisplay-clear
make Ctrl-L clear the screen instead of just starting a new line
2018-12-24 08:27:50 +01:00
Daiderd Jordan
a4b67d2268
make Ctrl-L clear the screen instead of just starting a new line 2018-12-23 20:49:25 +01:00
Joachim Nilsson
0b7142eb8e examples: cli: Add password prompt (hidden input) example
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-11-17 11:50:26 +01:00
Joachim Nilsson
2137b9df9f Revert "Merge pull request #21 from cogutvalera/issue_1171"
This reverts commit cddd8d8de0, reversing
changes made to 4ec7d26a9d.
2018-11-15 10:27:22 +01:00
Joachim Nilsson
66d8ae84e2 Revert "Coding style and const fixes to last PR"
This reverts commit fbb1f8800a.
2018-11-15 10:26:03 +01:00
Joachim Nilsson
fbb1f8800a Coding style and const fixes to last PR
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-10-24 08:28:34 +02:00
Joachim Nilsson
cddd8d8de0
Merge pull request #21 from cogutvalera/issue_1171
Hide secret information
2018-10-24 08:00:54 +02:00
Valera Cogut
1db83fe6c6 Fixed inconsistent indentation 2018-10-18 16:54:16 +03:00
Valera Cogut
3cd9894747 Added example for hiding secret information 2018-10-18 12:58:14 +03:00
Valera Cogut
4784fe2491 Hide secret information 2018-10-18 11:15:35 +03:00
Joachim Nilsson
4ec7d26a9d Fix #20: configure --disable-eof does not bite
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-21 07:17:19 +02:00
Joachim Nilsson
ebefa8b890 Refactor, simplify helper macro
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-21 07:12:24 +02:00
Joachim Nilsson
59fa265d91 Update ChangeLog and bump version for v1.16.0 release
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 10:10:03 +02:00
Joachim Nilsson
5f86c20c87 debian/control: Bump .so/ABI version
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 10:10:03 +02:00
Joachim Nilsson
237014f7d9 Bump ABI version
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 10:10:03 +02:00
Joachim Nilsson
bbd0621da8 debian/control: Set upstream author as maintainer
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 10:10:03 +02:00
Joachim Nilsson
1a5541256b debian/source/format: Add missing file
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2018-09-16 10:10:03 +02:00