]> git.lizzy.rs Git - linenoise.git/log
linenoise.git
11 years agoMerge pull request #3 from andreas-kupries/void-cast-clarification
Steve Bennett [Fri, 15 Feb 2013 02:29:34 +0000 (18:29 -0800)]
Merge pull request #3 from andreas-kupries/void-cast-clarification

Clarify the comment at the definition of IGNORE_RC.

11 years agoClarify the comment at the definition of IGNORE_RC.
Andreas Kupries [Fri, 25 Jan 2013 00:34:09 +0000 (16:34 -0800)]
Clarify the comment at the definition of IGNORE_RC.

11 years agoMerge pull request #2 from devurandom/msteveb/feature/completion-at-eol
Steve Bennett [Sun, 4 Nov 2012 10:18:42 +0000 (02:18 -0800)]
Merge pull request #2 from devurandom/msteveb/feature/completion-at-eol

Allow tab-completion only at the end of line and replace magic number

11 years agoAllow tab-completion only at the end of line
Dennis Schridde [Fri, 2 Nov 2012 09:50:00 +0000 (10:50 +0100)]
Allow tab-completion only at the end of line

11 years agoReplace magic number 9 with '\t' in linenoisePrompt()
Dennis Schridde [Fri, 2 Nov 2012 09:48:22 +0000 (10:48 +0100)]
Replace magic number 9 with '\t' in linenoisePrompt()

11 years agoFix linenoise serial console window size for vt102
Steve Bennett [Wed, 31 Oct 2012 03:17:24 +0000 (13:17 +1000)]
Fix linenoise serial console window size for vt102

This includes minicom, which doesn't support hpa (CHA), only cuf.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
11 years agoFix a linenoise bug when moving off the left
Steve Bennett [Thu, 18 Oct 2012 22:02:06 +0000 (08:02 +1000)]
Fix a linenoise bug when moving off the left

If the buffer is too big to fit in the window and the cursor
would move off the left edge of the windows, the display
is not shown correctly.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
11 years agoMerge pull request #1 from starwing/master
Steve Bennett [Wed, 6 Jun 2012 20:48:21 +0000 (13:48 -0700)]
Merge pull request #1 from starwing/master

add *.exe to gitignore, and fix several warnings from gcc.

11 years agoadd *.exe to ignore, fix gcc warnings
starwing [Wed, 6 Jun 2012 03:18:08 +0000 (11:18 +0800)]
add *.exe to ignore, fix gcc warnings

12 years agoFix first-chance exceptions in Windows
Tad Marshall [Mon, 17 Oct 2011 23:18:13 +0000 (19:18 -0400)]
Fix first-chance exceptions in Windows

A call to WriteConsoleOutputCharacter() didn't have its final parameter
set, passing a zero instead of a pointer to where to return the char count.
I added the same code that was there for FillConsoleOutputCharacter() and
FillConsoleOutputAttribute(), just allocate a dummy 'n' and pass its address.

12 years agoAdd MSVC support
Tad Marshall [Mon, 17 Oct 2011 22:49:25 +0000 (18:49 -0400)]
Add MSVC support

Test for _WIN32 to check for building for Windows.
Test __MINGW32__ to check for using MinGW compiler (on Windows).
If _WIN32 is defined and __MINGW32__ is not defined, assume Microsoft compiler, headers and libraries.
There are other ways this could be done, testing _MSC_VER for example, but these tests work.
Tested with Visual Studio 2005, MinGW 4.6.1 on Windows (mingw-get-inst-20110802.exe) and gcc 4.6.1
in Ubuntu 11.10 (Ubuntu/Linaro 4.6.1-9ubuntu3).

12 years agoFixed typo in README -- 'Readl world' => 'Real world'
Tad Marshall [Mon, 17 Oct 2011 21:31:07 +0000 (17:31 -0400)]
Fixed typo in README -- 'Readl world' => 'Real world'

12 years agoCombine some duplicate code
Steve Bennett [Thu, 29 Sep 2011 03:42:52 +0000 (13:42 +1000)]
Combine some duplicate code

Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoSupport more HOME/END escape sequences
Steve Bennett [Thu, 29 Sep 2011 03:42:15 +0000 (13:42 +1000)]
Support more HOME/END escape sequences

HOME: \e[7~
END: \e[8~

Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoDo not add duplicates lines to history
dvir volk [Wed, 28 Sep 2011 21:07:01 +0000 (00:07 +0300)]
Do not add duplicates lines to history

If the previous line is identical to the new line

12 years agoTabs not inserted as control characters
Steve Bennett [Sun, 25 Sep 2011 21:34:10 +0000 (07:34 +1000)]
Tabs not inserted as control characters

Due to missing parens in non-utf8 version of utf8_strlen()

Reported-by: Karl Robillard <krobillard@san.rr.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoUpdate comments and attributions for this fork
Steve Bennett [Thu, 15 Sep 2011 03:17:33 +0000 (13:17 +1000)]
Update comments and attributions for this fork

Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoLinenoise support for win32 console
Steve Bennett [Tue, 13 Sep 2011 22:16:54 +0000 (08:16 +1000)]
Linenoise support for win32 console

Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoRestructure linenoise in prep. for win32 support
Steve Bennett [Tue, 13 Sep 2011 22:15:48 +0000 (08:15 +1000)]
Restructure linenoise in prep. for win32 support

Separate out the termios-specific code

Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoAdd support for HOME and END keys
Steve Bennett [Tue, 13 Sep 2011 22:06:58 +0000 (08:06 +1000)]
Add support for HOME and END keys

Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoBetter integrate C++ example
Steve Bennett [Tue, 12 Apr 2011 23:43:59 +0000 (09:43 +1000)]
Better integrate C++ example

Signed-off-by: Steve Bennett <steveb@workware.net.au>
12 years agoBetter treatment of high-bit chars for non-utf8
Steve Bennett [Tue, 13 Sep 2011 22:57:13 +0000 (08:57 +1000)]
Better treatment of high-bit chars for non-utf8

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoconst correctness
Mathias Stearn [Fri, 18 Mar 2011 19:50:10 +0000 (14:50 -0500)]
const correctness

13 years agoAdded some casts to make it easier to include in a c++ project
Eliot Horowitz [Fri, 18 Mar 2011 07:47:51 +0000 (03:47 -0400)]
Added some casts to make it easier to include in a c++ project

13 years agoCHA is 1-based
Mathias Stearn [Mon, 11 Apr 2011 23:34:19 +0000 (19:34 -0400)]
CHA is 1-based

13 years agoOptimise common insert/remove char cases
Steve Bennett [Thu, 7 Apr 2011 21:38:24 +0000 (07:38 +1000)]
Optimise common insert/remove char cases

When at the end of the line and no scrolling is needed
Also, ^L forces recalculation of the window size on serial terminals.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoBetter line editing on serial terminals
Steve Bennett [Tue, 5 Apr 2011 02:40:39 +0000 (12:40 +1000)]
Better line editing on serial terminals

If TIOCGWINSZ doesn't work, try to query the window width
with escape sequences.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoFix line editing when columns unavailable
Steve Bennett [Thu, 17 Mar 2011 06:39:06 +0000 (16:39 +1000)]
Fix line editing when columns unavailable

Sometimes TIOCGWINSZ succeeds but returns columns=0
This makes line editing work rather badly.

If this occurs, just behave as though TIOCGWINSZ had failed
and assume 80 columns.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoMinor compiler warning fixes
Steve Bennett [Sun, 28 Nov 2010 13:58:55 +0000 (23:58 +1000)]
Minor compiler warning fixes

Also, don't define _XOPEN_SOURCE if already defined

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoAdd utf-8 support to linenoise.c
Steve Bennett [Fri, 8 Oct 2010 12:55:20 +0000 (22:55 +1000)]
Add utf-8 support to linenoise.c

Plus general improvements, including:
- Allow pasting newlines to linenoise. Use TCSADRAIN, not TCAFLUSH
  so that unused input is not flushed

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoBig cleanups to linenoise
Steve Bennett [Thu, 7 Apr 2011 22:11:09 +0000 (08:11 +1000)]
Big cleanups to linenoise

- Use a structure (current) to hold the state.
- Add fd_printf() to simplify output
- Add has_room(), insert_char(), remove_char(), fd_read()
- Use ctrl(X) instead of magic numbers
- Escape special chars in the history file
- Provide access to the history lines
- Completion support is optional

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoAllow ^V to enter arbitrary control characters
Steve Bennett [Thu, 30 Sep 2010 22:25:56 +0000 (08:25 +1000)]
Allow ^V to enter arbitrary control characters

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoHighlight control characters
Steve Bennett [Thu, 30 Sep 2010 22:23:28 +0000 (08:23 +1000)]
Highlight control characters

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoAdd support for ^W to remove a word on the left
Steve Bennett [Thu, 30 Sep 2010 22:32:44 +0000 (08:32 +1000)]
Add support for ^W to remove a word on the left

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoSupport reverse incremental search with ^R
Steve Bennett [Thu, 30 Sep 2010 20:11:32 +0000 (06:11 +1000)]
Support reverse incremental search with ^R

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoHandle control characters in the line
Steve Bennett [Thu, 30 Sep 2010 20:07:42 +0000 (06:07 +1000)]
Handle control characters in the line

Only allow tab (^I) to be inserted in the line, not other
control characters.
But display any control character as ^x and handle
the cursor properly.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoFix arrow keys on some terminals
Steve Bennett [Thu, 30 Sep 2010 20:01:27 +0000 (06:01 +1000)]
Fix arrow keys on some terminals

Some terminals use ^[OA instead of ^[[A for up arrow, etc.

Signed-off-by: Steve Bennett <steveb@workware.net.au>
13 years agoswitched to two-clause simplified BSD license
antirez [Wed, 30 Mar 2011 15:08:20 +0000 (17:08 +0200)]
switched to two-clause simplified BSD license

13 years agoSupport for ctrl-d deleting the char at right of the cursor added
antirez [Tue, 22 Feb 2011 16:38:49 +0000 (17:38 +0100)]
Support for ctrl-d deleting the char at right of the cursor added

13 years agosuppress a warning on Linux adding some truly stupid code
antirez [Fri, 10 Dec 2010 18:21:28 +0000 (19:21 +0100)]
suppress a warning on Linux adding some truly stupid code

13 years agoCtrl-l support to clear the screen. New sequences added documented.
antirez [Wed, 1 Dec 2010 10:11:55 +0000 (11:11 +0100)]
Ctrl-l support to clear the screen. New sequences added documented.

13 years agogitignore added
antirez [Tue, 30 Nov 2010 10:37:48 +0000 (11:37 +0100)]
gitignore added

13 years agoPieter Noordhuis copyright notice added, since this was a major contribution. README...
antirez [Tue, 30 Nov 2010 10:34:06 +0000 (11:34 +0100)]
Pieter Noordhuis copyright notice added, since this was a major contribution. README updated.

13 years agoShow original buffer when completion is aborted
Pieter Noordhuis [Mon, 29 Nov 2010 19:35:20 +0000 (20:35 +0100)]
Show original buffer when completion is aborted

13 years agoMinimal framework for autocompletion
Pieter Noordhuis [Mon, 29 Nov 2010 17:52:55 +0000 (18:52 +0100)]
Minimal framework for autocompletion

13 years agosupport for delete key, thanks to jgriffiths (on github)
antirez [Fri, 24 Sep 2010 15:05:18 +0000 (17:05 +0200)]
support for delete key, thanks to jgriffiths (on github)

13 years agoSupport API to save/load history on file
antirez [Wed, 7 Jul 2010 16:26:23 +0000 (18:26 +0200)]
Support API to save/load history on file

13 years agoFixed another mem leak
antirez [Wed, 7 Jul 2010 16:05:11 +0000 (18:05 +0200)]
Fixed another mem leak

13 years agoenabled debugging symbols in Make, used NULL instead of 0 introduced for a typo
antirez [Wed, 7 Jul 2010 11:28:26 +0000 (13:28 +0200)]
enabled debugging symbols in Make, used NULL instead of 0 introduced for a typo

13 years agoFixed one memleak, investigating the next one
antirez [Wed, 7 Jul 2010 11:19:29 +0000 (13:19 +0200)]
Fixed one memleak, investigating the next one

14 years agoREADME modified, again
antirez [Wed, 2 Jun 2010 01:21:03 +0000 (03:21 +0200)]
README modified, again

14 years agoREADME modified
antirez [Wed, 2 Jun 2010 01:19:42 +0000 (03:19 +0200)]
README modified

14 years agoRevert to fgets if stdin is not a tty
antirez [Fri, 30 Apr 2010 07:19:04 +0000 (09:19 +0200)]
Revert to fgets if stdin is not a tty

14 years agoeterm removed from the blacklist
antirez [Wed, 24 Mar 2010 21:13:51 +0000 (22:13 +0100)]
eterm removed from the blacklist

14 years agosupport for blacklist terminals, reverting to fgets.
antirez [Wed, 24 Mar 2010 08:59:34 +0000 (09:59 +0100)]
support for blacklist terminals, reverting to fgets.

14 years agoREADME changes
antirez [Tue, 23 Mar 2010 19:10:06 +0000 (20:10 +0100)]
README changes

14 years agonow the API to add an history entry has a const argument
antirez [Tue, 23 Mar 2010 12:49:32 +0000 (13:49 +0100)]
now the API to add an history entry has a const argument

14 years agoctrl-t implemented
antirez [Mon, 22 Mar 2010 18:54:24 +0000 (19:54 +0100)]
ctrl-t implemented

14 years agosupported more emacs bindings, don't wrap history forever but blocks on first and...
antirez [Mon, 22 Mar 2010 18:49:56 +0000 (19:49 +0100)]
supported more emacs bindings, don't wrap history forever but blocks on first and last item

14 years agominor doc update
antirez [Mon, 22 Mar 2010 16:26:58 +0000 (17:26 +0100)]
minor doc update

14 years agoAPI converted to be readline alike. Ctrl-d behavior fixed.
antirez [Mon, 22 Mar 2010 16:24:28 +0000 (17:24 +0100)]
API converted to be readline alike. Ctrl-d behavior fixed.

14 years agominor doc update
antirez [Mon, 22 Mar 2010 01:55:22 +0000 (02:55 +0100)]
minor doc update

14 years agoMore precise motivations in README
antirez [Mon, 22 Mar 2010 01:40:53 +0000 (02:40 +0100)]
More precise motivations in README

14 years agoCtrl-h problem fixed
antirez [Mon, 22 Mar 2010 01:30:34 +0000 (02:30 +0100)]
Ctrl-h problem fixed

14 years agoMore internals documentation
antirez [Mon, 22 Mar 2010 00:25:21 +0000 (01:25 +0100)]
More internals documentation

14 years agoreferences comments updated with more links to escape sequences documentation
antirez [Mon, 22 Mar 2010 00:09:25 +0000 (01:09 +0100)]
references comments updated with more links to escape sequences documentation

14 years agoFix for an history bug
antirez [Sun, 21 Mar 2010 21:27:09 +0000 (22:27 +0100)]
Fix for an history bug

14 years agoREADME changes
antirez [Sun, 21 Mar 2010 21:16:46 +0000 (22:16 +0100)]
README changes

14 years agoCtrl+a and Ctrl+e support
antirez [Sun, 21 Mar 2010 10:10:54 +0000 (11:10 +0100)]
Ctrl+a and Ctrl+e support

14 years agoSupport for Ctrl+u added
antirez [Sun, 21 Mar 2010 10:06:56 +0000 (11:06 +0100)]
Support for Ctrl+u added

14 years agoCtrl+K support
antirez [Sun, 21 Mar 2010 10:03:33 +0000 (11:03 +0100)]
Ctrl+K support

14 years agoREADME changes
antirez [Sun, 21 Mar 2010 09:29:32 +0000 (10:29 +0100)]
README changes

14 years agoREADME changes
antirez [Sun, 21 Mar 2010 09:27:51 +0000 (10:27 +0100)]
README changes

14 years agoREADME added
antirez [Sun, 21 Mar 2010 09:26:10 +0000 (10:26 +0100)]
README added

14 years agofirst commit
antirez [Sat, 20 Mar 2010 23:01:52 +0000 (00:01 +0100)]
first commit