Commit Graph

9 Commits

Author SHA1 Message Date
Pedro F. Giffuni
450aba5b34 MFV r312996:
Re-import libedit 2016-02-27

This reverts r296435: the issues related to lldb and this update appear to
have been identified (in lldb).

Obtained from:	NetBSD
Reported by:	emaste
MFC after:	3 weeks
2017-01-30 22:11:53 +00:00
Pedro F. Giffuni
14eaf4448c libedit: replace 0 with NULL for pointers.
Found with devel/coccinelle.

Reviewed by:	Christos Zoulas
2016-04-09 18:52:09 +00:00
Pedro F. Giffuni
1f37f0f18f Revert r296175
Undo update of libedit 2016-02-27

Something in libedit appears to be causing breakage in lldb38.
The changes are not generally huge but they are suficient to
to justify reverting for now.

Reported by:	novel, bapt
2016-03-06 21:32:54 +00:00
Pedro F. Giffuni
e81f248547 MFV r296159
Sync our libedit with NetBSD's libedit 2016-02-27.

Obtained from:	NetBSD
2016-02-29 00:15:25 +00:00
Baptiste Daroussin
c1a66a97f9 Synchronize libedit with NetBSD and activate UTF-8 support [1]
Differences with NetBSD
Reapply our local patches on top of it
Fix Unicode environement detection
Fix reading a line in unicode environment.
It allows /bin/sh to works in UTF-8 envs

Differential Revision:	https://reviews.freebsd.org/D1455
Reviewed by:	jilles, pfg
Obtained from:	NetBSD [1]
MFC after:	1 month
Relnotes:	yes
2015-01-09 07:40:56 +00:00
Jilles Tjoelker
196ff96e78 libedit: Reduce surprising behaviour with filename completion some more:
* Quote '*', '?' and '['. While it may be more useful to expand them to
  matching pathnames, this at least matches with the completion we do.
* '@' is a regular character for filenames. Some other shells do
  @<hostname> completion but we do not.
* Prefix names starting with '-' and '+' with './' so they are not seen as
  options.
2010-06-15 22:23:21 +00:00
Jilles Tjoelker
3d0f8bcd30 libedit: Allow simple quoting in filename completion.
The completer recognizes characters escaped with backslashes as being
literal parts of a word, and adds backslashes to avoid almost all
misinterpretation. In particular, filenames containing spaces can be
completed correctly.

For bug compatibility with the NetBSD version, the improved completion
function has a new name, _el_fn_sh_complete, and _el_fn_complete is
unchanged.

Submitted by:	Guy Yur
2010-06-15 21:34:57 +00:00
Jilles Tjoelker
da8301c83a libedit: Fix a bug that could make completion listings incomplete.
The element matches[0] is the common prefix and is not counted in len, so
subtracting 1 is not needed. A counter for the number of matches per line
was incremented twice.

Submitted by:	Guy Yur
2010-06-15 21:00:53 +00:00
Jilles Tjoelker
96535454fc libedit: Add basic filename completion code from NetBSD.
This will be used to provide filename completion in sh(1).

Changes from the NetBSD code:
* wide character support disabled, as in the rest of libedit
* config.h and related portability stuff reduced/disabled, as in the rest
  of libedit

Submitted by:	Guy Yur
Obtained from:	NetBSD
2010-06-13 17:04:42 +00:00