summaryrefslogtreecommitdiff
path: root/lib/libedit
AgeCommit message (Collapse)Author
2021-09-26make flag unsigned to match prototype of the function usedchristos
2021-09-26- Completion should not add a quote at the end of the line to match anchristos
already quoted quote. (Piotr Stefaniak) - fix lint unconst warnings for strchr
2021-09-10libedit: fix indentationrillig
No change to the resulting object files.
2021-09-10Add an LLVM fuzzing wrapper for the portable libedit (Christian Holler)christos
2021-09-10rl_startup_hook should be called each time. From Carlos Henrique Lima Melarachristos
2021-09-09fix memory issues found by fuzzing (double frees and buffer overflows)christos
2021-09-09Add casts to appease conversions between wchar_t and wint_tchristos
2021-09-03Try to refactor this in order to correct some of the memory issueschristos
reported by Christian Holler.
2021-08-30Add a changes filechristos
2021-08-29^W is traditionally bound to ed-delete-prev-word and not kill-regionchristos
^R is traditionally bound to em-inc-search-next and not redisplay This is what mksh, zsh bash, readline do (Baptiste Daroussin)
2021-08-28Respect $EDITOR when execution one (Baptiste Daroussin)christos
2021-08-21PR/56370: mirabilos: libedit change from 2017 kills history in gdbchristos
2021-08-21Add more api to make gdb-11 happy (but not gdbtui as usual)christos
2021-08-15libedit: simplify calls to macro ADD_STRINGrillig
The lint comments CONSTCOND and LINTED were not necessary. It is simpler to just specify what to free. GCC optimizes free(NULL) to be a no-op. No functional change.
2021-08-15readline: fix lint warning about effective unconst castrillig
Calling strchr to avoid the syntactical unconst cast is not necessary here. A simple pointer assignment is enough. No functional change.
2021-08-15Add verb to sentence.wiz
2021-08-15Disable attempts to handle EINTR and non-blocking I/O by default. It ischristos
confusing to other programs and unexpected behavior. Reported by Ingo Schwarze. This behavior is now controlled with EL_SAFEREAD.
2021-08-15Add a LINTED comment... Why doesn't NOTREACHED work?christos
2021-07-31s/dependend/dependent/andvar
2021-07-14Via Jess Thrysoee, from Adrian Bunk: Fix libedit build on Linux/Alphachristos
Alpha is the only Linux architecture that has SIGINFO: https://sources.debian.org/src/manpages/5.10-1/man7/signal.7/#L522 But even on Alpha Ctrl-T is not supported, and therefore no VSTATUS: https://sources.debian.org/src/manpages/5.10-1/man3/termios.3/#L603-L608 For consistency check both signal existence and character existence
2021-05-05PR/56147: Miroslav Lichvar: Avoid memory leak if strdup fails.christos
2021-03-28Only unescape when we are quoting and don't add a space if we are quotingchristos
(we already did) (Piotr Stefaniak)
2021-03-28document the flagchristos
2021-03-28Pass the unescaped filename the the append function so it has to do less workchristos
(for example it can call stat(2) directly (Piotr Stefaniak)
2021-03-27Add fn_complete2() that controls the quoting of the returned match.christos
Before it was based on the heuristic that we were not supplied an attempted_completion_function, which worked well because programs that supplied that function were not shells and did not want/understand shell quoting. Recently though Piotr Stefaniak wanted to enhance command completion for the Bourne Shell and this could benefit quoting the returned command. This function adds an extra flags argument that controls that quoting.
2020-07-10Fix numeric variable handling in settc (lyzliyuzhi at 163 dot com)christos
2020-05-31use strlcpy() instead of strncpy() for gcc happinesschristos
2020-03-30patbuf must be updated if the length of patbuf is greater than or equal to ↵ryo
0. (that is always) fix of r1.7 was incorrect.
2020-03-30fix build error with SDEBUG, MAP_DEBUG, DEBUG_REFRESHryo
2020-01-05PR lib/54510 - when user supplied completion function is there,abhinav
don't unescape the string to be completed.
2020-01-05Summary: Remove over-simplified extraneous testtih
The file name matching code in libedit tries to adjust to the presence of explicit " or ' characters in the input line, but tries too hard. Remove a conditional that goes overboard, and causes the completion code to fail if a quoted string is seen before the filename to be expanded, as in grep 'foo' bar<TAB> Before this change, the above would not expand any possible completions, even if they existed, because it would choose to look for files whose names started with " bar".
2019-12-10When 'attempted_completion_function' non-NULL, with a 'single_match'christos
match, the expected space is not being added. Problem observed with "chronyc" and "sqlite3" tab completion. That functionality got moved to escape_filename() for the !attempted_completion_function case, but the non-NULL 'attempted_completion_function' case must also be handled. (Lonnie Abelbeck)
2019-11-12PR/54654: Soren Tempel: Make sure el_cursor.v < el_terminal.t_size.v whenchristos
moving around.
2019-10-13introduce some common variables for use in GCC warning disables:mrg
GCC_NO_FORMAT_TRUNCATION -Wno-format-truncation (GCC 7/8) GCC_NO_STRINGOP_TRUNCATION -Wno-stringop-truncation (GCC 8) GCC_NO_STRINGOP_OVERFLOW -Wno-stringop-overflow (GCC 8) GCC_NO_CAST_FUNCTION_TYPE -Wno-cast-function-type (GCC 8) use these to turn off warnings for most GCC-8 complaints. many of these are false positives, most of the real bugs are already commited, or are yet to come. we plan to introduce versions of (some?) of these that use the "-Wno-error=" form, which still displays the warnings but does not make it an error, and all of the above will be re-considered as either being "fix me" (warning still displayed) or "warning is wrong."
2019-10-09add +1 to strlcpy's (Patrick Welche)christos
2019-10-08remore error(1) commentchristos
2019-10-08Change strncpy to either memcpy (when we know the len), or strlcpy (whenchristos
we used to NUL terminate explicitly.
2019-09-15Fix type and remove cast (Yuichiro NAITO/FreeBSD).christos
2019-09-08PR lib/54510: Fix file completion inside quotes which broke in rev 1.53abhinav
While there also fix handling character appending in the file completions when inside quotes. For example when inside a quote, if the completion is a directory then append a '/' but don't close the quote. On the other hand when inside a quote if the completion is a file name and it is the only match then we can close the quote.
2019-08-21Increment offset when adding an element to history to keep it aligned withchristos
the last element entered (Sandy Li Changqing)
2019-07-28PR/54415: Ricky Zhou: libedit stats completions for non-file completionschristos
Use the proper completion function and account for the character appended by the function when computing the number of columns.
2019-07-23remove stray bracechristos
2019-07-23put the NULL check immediately after the allocationchristos
2019-07-23PR/54399: Sören Tempel: Uninitialized memory access in libedit history.christos
Initialize the buffer using calloc. While here change all malloc(a * sizeof(b)) to calloc(a, sizeof(b)). XXX: should fix realloc similarly.
2019-07-23PR/54400: Sören Tempel: out-of-bounds read in libedit c_delbeforechristos
2019-06-30Add a comment explaining why we don't use DO here. Correct the attributionchristos
on the previous patch: The patch was from Jordan Lewis and the report from Raphael Poss.
2019-06-29PR/54329: Raphael Ross: According to https://www.gnu.org/software/termutils/\christos
manual/termcap-1.3/html_chapter/termcap_4.html#SEC23 the cursor move multiple escapes have undefined results when moving out of the screen. Stop using DO to move down multiple lines and use a loop of newlines instead.
2019-06-07PR/54281: Jonathan Perkins: NUL terminate rl_line_buffer on modificationchristos
to avoid completion leak.
2019-06-07PR/54280: rl_completer_quote_characters should be const for readline compatchristos
2019-06-07PR/54279: Jonathan Perkins: Ignore adjacent start/end prompt ignore.christos