The NetBSD Project

CVS log for src/lib/libedit/filecomplete.c

[BACK] Up to [cvs.NetBSD.org] / src / lib / libedit

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.73 / (download) - annotate - [select for diffs], Tue Apr 25 17:51:32 2023 UTC (11 months, 3 weeks ago) by christos
Branch: MAIN
CVS Tags: HEAD
Changes since 1.72: +3 -3 lines
Diff to previous 1.72 (colored) to selected 1.48.2.1 (colored)

pass lint.

Revision 1.72 / (download) - annotate - [select for diffs], Fri Feb 3 22:01:42 2023 UTC (14 months, 1 week ago) by christos
Branch: MAIN
Changes since 1.71: +12 -2 lines
Diff to previous 1.71 (colored) to selected 1.48.2.1 (colored)

Add a entry point for the complete function for FreeBSD compatibility with sh.

Revision 1.71 / (download) - annotate - [select for diffs], Sun Oct 30 19:11:31 2022 UTC (17 months, 2 weeks ago) by christos
Branch: MAIN
CVS Tags: netbsd-10-base, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10
Changes since 1.70: +4 -2 lines
Diff to previous 1.70 (colored) to selected 1.48.2.1 (colored)

improvements in malloc/free handling.

Revision 1.70 / (download) - annotate - [select for diffs], Sat Mar 12 15:29:17 2022 UTC (2 years, 1 month ago) by christos
Branch: MAIN
Changes since 1.69: +9 -9 lines
Diff to previous 1.69 (colored) to selected 1.48.2.1 (colored)

Fix filename autocompletion for strings like a\)b

An escaped character should unconditionally be skipped together with the
character that does the escaping. For example, in "a\)b" only the ")b"
part was skipped but then the loop stopped at the "\" since it's one of
the characters listed in word_break. (Piotr P. Stefaniak)

Revision 1.69 / (download) - annotate - [select for diffs], Sun Sep 26 13:45:37 2021 UTC (2 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.68: +16 -13 lines
Diff to previous 1.68 (colored) to selected 1.48.2.1 (colored)

- Completion should not add a quote at the end of the line to match an
  already quoted quote. (Piotr Stefaniak)
- fix lint unconst warnings for strchr

Revision 1.68 / (download) - annotate - [select for diffs], Wed May 5 14:49:59 2021 UTC (2 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x
Changes since 1.67: +4 -3 lines
Diff to previous 1.67 (colored) to selected 1.48.2.1 (colored)

PR/56147: Miroslav Lichvar: Avoid memory leak if strdup fails.

Revision 1.67 / (download) - annotate - [select for diffs], Sun Mar 28 13:39:39 2021 UTC (3 years ago) by christos
Branch: MAIN
Changes since 1.66: +6 -4 lines
Diff to previous 1.66 (colored) to selected 1.48.2.1 (colored)

Only unescape when we are quoting and don't add a space if we are quoting
(we already did) (Piotr Stefaniak)

Revision 1.66 / (download) - annotate - [select for diffs], Sun Mar 28 13:33:54 2021 UTC (3 years ago) by christos
Branch: MAIN
Changes since 1.65: +3 -3 lines
Diff to previous 1.65 (colored) to selected 1.48.2.1 (colored)

Pass the unescaped filename the the append function so it has to do less work
(for example it can call stat(2) directly (Piotr Stefaniak)

Revision 1.65 / (download) - annotate - [select for diffs], Sat Mar 27 18:55:02 2021 UTC (3 years ago) by christos
Branch: MAIN
Changes since 1.64: +27 -12 lines
Diff to previous 1.64 (colored) to selected 1.48.2.1 (colored)

Add fn_complete2() that controls the quoting of the returned match.
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.

Revision 1.51.2.2 / (download) - annotate - [select for diffs], Mon Apr 13 08:03:12 2020 UTC (4 years ago) by martin
Branch: phil-wifi
Changes since 1.51.2.1: +148 -119 lines
Diff to previous 1.51.2.1 (colored) to branchpoint 1.51 (colored) next main 1.52 (colored) to selected 1.48.2.1 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.64 / (download) - annotate - [select for diffs], Sun Jan 5 07:12:05 2020 UTC (4 years, 3 months ago) by abhinav
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, is-mlppp-base, is-mlppp
Changes since 1.63: +17 -8 lines
Diff to previous 1.63 (colored) to selected 1.48.2.1 (colored)

PR lib/54510 - when user supplied completion function is there,
don't unescape the string to be completed.

Revision 1.63 / (download) - annotate - [select for diffs], Sun Jan 5 00:03:27 2020 UTC (4 years, 3 months ago) by tih
Branch: MAIN
Changes since 1.62: +4 -8 lines
Diff to previous 1.62 (colored) to selected 1.48.2.1 (colored)

Summary: Remove over-simplified extraneous test

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".

Revision 1.62 / (download) - annotate - [select for diffs], Tue Dec 10 19:42:09 2019 UTC (4 years, 4 months ago) by christos
Branch: MAIN
Changes since 1.61: +93 -90 lines
Diff to previous 1.61 (colored) to selected 1.48.2.1 (colored)

When 'attempted_completion_function' non-NULL, with a 'single_match'
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)

Revision 1.61 / (download) - annotate - [select for diffs], Wed Oct 9 14:31:07 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-20191119
Changes since 1.60: +5 -5 lines
Diff to previous 1.60 (colored) to selected 1.48.2.1 (colored)

add +1 to strlcpy's (Patrick Welche)

Revision 1.60 / (download) - annotate - [select for diffs], Tue Oct 8 19:21:40 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.59: +2 -3 lines
Diff to previous 1.59 (colored) to selected 1.48.2.1 (colored)

remore error(1) comment

Revision 1.59 / (download) - annotate - [select for diffs], Tue Oct 8 19:17:57 2019 UTC (4 years, 6 months ago) by christos
Branch: MAIN
Changes since 1.58: +6 -8 lines
Diff to previous 1.58 (colored) to selected 1.48.2.1 (colored)

Change strncpy to either memcpy (when we know the len), or strlcpy (when
we used to NUL terminate explicitly.

Revision 1.58 / (download) - annotate - [select for diffs], Sun Sep 8 05:50:58 2019 UTC (4 years, 7 months ago) by abhinav
Branch: MAIN
Changes since 1.57: +46 -22 lines
Diff to previous 1.57 (colored) to selected 1.48.2.1 (colored)

PR lib/54510: Fix file completion inside quotes which broke in rev 1.53

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.

Revision 1.57 / (download) - annotate - [select for diffs], Sun Jul 28 09:27:29 2019 UTC (4 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: netbsd-9-base, netbsd-9-3-RELEASE, netbsd-9-2-RELEASE, netbsd-9-1-RELEASE, netbsd-9-0-RELEASE, netbsd-9-0-RC2, netbsd-9-0-RC1, netbsd-9
Changes since 1.56: +4 -4 lines
Diff to previous 1.56 (colored) to selected 1.48.2.1 (colored)

PR/54415: Ricky Zhou: libedit stats completions for non-file completions
Use the proper completion function and account for the character appended
by the function when computing the number of columns.

Revision 1.56 / (download) - annotate - [select for diffs], Tue Jul 23 10:18:52 2019 UTC (4 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.55: +7 -7 lines
Diff to previous 1.55 (colored) to selected 1.48.2.1 (colored)

PR/54399: Sen Tempel: Uninitialized memory access in libedit history.
Initialize the buffer using calloc. While here change all malloc(a * sizeof(b))
to calloc(a, sizeof(b)). XXX: should fix realloc similarly.

Revision 1.51.2.1 / (download) - annotate - [select for diffs], Mon Jun 10 22:05:23 2019 UTC (4 years, 10 months ago) by christos
Branch: phil-wifi
Changes since 1.51: +75 -31 lines
Diff to previous 1.51 (colored) to selected 1.48.2.1 (colored)

Sync with HEAD

Revision 1.55 / (download) - annotate - [select for diffs], Sat Apr 20 08:44:10 2019 UTC (5 years ago) by abhinav
Branch: MAIN
CVS Tags: phil-wifi-20190609
Changes since 1.54: +5 -4 lines
Diff to previous 1.54 (colored) to selected 1.48.2.1 (colored)

PR lib/54131 - declare the loop variable outside the for loop

Revision 1.54 / (download) - annotate - [select for diffs], Fri Apr 12 15:12:29 2019 UTC (5 years ago) by christos
Branch: MAIN
Changes since 1.53: +24 -6 lines
Diff to previous 1.53 (colored) to selected 1.48.2.1 (colored)

PR/54117: Paavo Helde: Fix memory overrun: Account for the closing quote
in memory allocation if quoted.

Revision 1.53 / (download) - annotate - [select for diffs], Sun Mar 31 03:04:57 2019 UTC (5 years ago) by abhinav
Branch: MAIN
Changes since 1.52: +50 -29 lines
Diff to previous 1.52 (colored) to selected 1.48.2.1 (colored)

Perform quoting of filename completions when there are multiple matches as well

Quoting of special characters in filename completion was implemented for single match
case, this enables it for multiple matches as well. For example:

$ touch 'foo bar'
$ touch 'foo baz'
$ ls fo<TAB>
autocompletes to =>
$ ls foo\ ba
hitting <TAB> again shows:
foo bar foo baz

This required unescaping escape sequences generated during last completion
in order to find the word to complete.

While there, also update the test to include cases for multiple matches.

Reviewed by christos

Revision 1.52 / (download) - annotate - [select for diffs], Sun Mar 24 16:42:49 2019 UTC (5 years ago) by abhinav
Branch: MAIN
Changes since 1.51: +11 -7 lines
Diff to previous 1.51 (colored) to selected 1.48.2.1 (colored)

Only quote the completion matches if we are doing filename completion

If the user supplies a value for the attempted_completion_function parameter
then we cannot be sure if the completion is for filename or something else, in such
a case don't attempt to quote the completion matches.

Reviewed by christos

This should address PR lib/54067

Revision 1.48.2.1 / (download) - annotate - [selected], Mon May 21 04:35:55 2018 UTC (5 years, 10 months ago) by pgoyette
Branch: pgoyette-compat
CVS Tags: pgoyette-compat-merge-20190127
Changes since 1.48: +50 -14 lines
Diff to previous 1.48 (colored) next main 1.49 (colored)

Sync with HEAD

Revision 1.51 / (download) - annotate - [select for diffs], Fri May 4 20:38:26 2018 UTC (5 years, 11 months ago) by christos
Branch: MAIN
CVS Tags: phil-wifi-base, pgoyette-compat-20190127, pgoyette-compat-20190118, pgoyette-compat-1226, pgoyette-compat-1126, pgoyette-compat-1020, pgoyette-compat-0930, pgoyette-compat-0906, pgoyette-compat-0728, pgoyette-compat-0625, pgoyette-compat-0521
Branch point for: phil-wifi
Changes since 1.50: +5 -3 lines
Diff to previous 1.50 (colored) to selected 1.48.2.1 (colored)

fix uninitialized

Revision 1.50 / (download) - annotate - [select for diffs], Fri May 4 16:39:14 2018 UTC (5 years, 11 months ago) by abhinav
Branch: MAIN
Changes since 1.49: +46 -14 lines
Diff to previous 1.49 (colored) to selected 1.48.2.1 (colored)

Handle filename autocompletion when the cursor is at a backslash or quote character

For example, handle following case:
	$ touch 'foo bar'
	$ ls foo\<TAB> --> $ ls foo\ bar

Also add test cases for this.

Thanks to Christos for review

Revision 1.49 / (download) - annotate - [select for diffs], Wed May 2 08:45:03 2018 UTC (5 years, 11 months ago) by abhinav
Branch: MAIN
Changes since 1.48: +4 -2 lines
Diff to previous 1.48 (colored) to selected 1.48.2.1 (colored)

Add '*' and '[' to the list of characters which need escaping during autocompletion

Revision 1.48 / (download) - annotate - [select for diffs], Fri Oct 27 18:16:09 2017 UTC (6 years, 5 months ago) by abhinav
Branch: MAIN
CVS Tags: pgoyette-compat-base, pgoyette-compat-0502, pgoyette-compat-0422, pgoyette-compat-0415, pgoyette-compat-0407, pgoyette-compat-0330, pgoyette-compat-0322, pgoyette-compat-0315
Branch point for: pgoyette-compat
Changes since 1.47: +8 -2 lines
Diff to previous 1.47 (colored) to selected 1.48.2.1 (colored)

Add NULL check after doing memory allocation at a couple of places

ok christos@

Revision 1.47 / (download) - annotate - [select for diffs], Sun Oct 15 18:59:00 2017 UTC (6 years, 6 months ago) by abhinav
Branch: MAIN
Changes since 1.46: +155 -19 lines
Diff to previous 1.46 (colored) to selected 1.48.2.1 (colored)

Add support for escaping special characters when doing filename completion.

For instance if the file name is "foo bar":
$ ls foo<TAB>
should get autocompleted to:
$ ls foo\ bar

Works for similar other characters too, which need escaping.

Also, add an accompanying test program to ensure the escaping is correct
in various scenarios (within quotes, without quotes, with other special characeters)

Thanks to Christos for reviews, help and feedback.

Revision 1.46 / (download) - annotate - [select for diffs], Sat Sep 16 20:40:34 2017 UTC (6 years, 7 months ago) by abhinav
Branch: MAIN
Changes since 1.45: +3 -3 lines
Diff to previous 1.45 (colored) to selected 1.48.2.1 (colored)

Fix indentation (convert spaces to tab)

Revision 1.43.2.2 / (download) - annotate - [select for diffs], Wed Apr 26 02:52:55 2017 UTC (6 years, 11 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.43.2.1: +12 -6 lines
Diff to previous 1.43.2.1 (colored) to branchpoint 1.43 (colored) next main 1.44 (colored) to selected 1.48.2.1 (colored)

Sync with HEAD

Revision 1.44.2.1 / (download) - annotate - [select for diffs], Fri Apr 21 16:53:10 2017 UTC (6 years, 11 months ago) by bouyer
Branch: bouyer-socketcan
Changes since 1.44: +12 -6 lines
Diff to previous 1.44 (colored) next main 1.45 (colored) to selected 1.48.2.1 (colored)

Sync with HEAD

Revision 1.45 / (download) - annotate - [select for diffs], Fri Apr 21 05:38:03 2017 UTC (6 years, 11 months ago) by abhinav
Branch: MAIN
CVS Tags: prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-20170426, perseant-stdc-iso10646-base, perseant-stdc-iso10646, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, matt-nb8-mediatek-base, matt-nb8-mediatek, bouyer-socketcan-base1
Changes since 1.44: +12 -6 lines
Diff to previous 1.44 (colored) to selected 1.48.2.1 (colored)

When doing filename autocompletion, append a trailing slash at the end of directory
names. We already do this when there is only one completion option but
in case of of multiple completion options, it wasn't being done.

ok christos@

Revision 1.43.2.1 / (download) - annotate - [select for diffs], Fri Nov 4 14:48:53 2016 UTC (7 years, 5 months ago) by pgoyette
Branch: pgoyette-localcount
Changes since 1.43: +3 -6 lines
Diff to previous 1.43 (colored) to selected 1.48.2.1 (colored)

Sync with HEAD

Revision 1.44 / (download) - annotate - [select for diffs], Mon Oct 31 17:46:32 2016 UTC (7 years, 5 months ago) by abhinav
Branch: MAIN
CVS Tags: pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, bouyer-socketcan-base
Branch point for: bouyer-socketcan
Changes since 1.43: +3 -6 lines
Diff to previous 1.43 (colored) to selected 1.48.2.1 (colored)

Fix file name auto completion in one specific case.

For example if you do
$mkdir -p /tmp/dir1/dir2

Then:
$ls /tmp/di <TAB> auto completes to
$ls /tmp/dir1/

Hitting <TAB> again auto completes to
$ls /tmp/dir1/dir2

Whereas it should auto complete to
$ls /tmp/dir1/dir2/


Essentially, in cases like above where you have to hit <TAB> twice to get
to the match and there is only one match (because only one file/sub-directory) then
auto complete doesn't work correctly. It doesn't append a trailing slash (in case
of directory) or a space (in case of a file) to the match name.

I have tested file name completion in sh(1) and symbol completion in gdb after
this change.

Revision 1.43 / (download) - annotate - [select for diffs], Mon Apr 11 00:50:13 2016 UTC (8 years ago) by christos
Branch: MAIN
CVS Tags: pgoyette-localcount-base, pgoyette-localcount-20160806, pgoyette-localcount-20160726, localcount-20160914
Branch point for: pgoyette-localcount
Changes since 1.42: +6 -8 lines
Diff to previous 1.42 (colored) to selected 1.48.2.1 (colored)

Char -> wchar_t from Ingo Schwarze.

Revision 1.42 / (download) - annotate - [select for diffs], Mon Apr 11 00:22:48 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.41: +9 -9 lines
Diff to previous 1.41 (colored) to selected 1.48.2.1 (colored)

more macro WIDECHAR undoing from Ingo Schwarze.

Revision 1.41 / (download) - annotate - [select for diffs], Sat Apr 9 18:47:05 2016 UTC (8 years ago) by christos
Branch: MAIN
Changes since 1.40: +4 -4 lines
Diff to previous 1.40 (colored) to selected 1.48.2.1 (colored)

Change some 0's to NULL's from Pedro Giffuni

Revision 1.40 / (download) - annotate - [select for diffs], Wed Feb 17 19:47:49 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.39: +11 -11 lines
Diff to previous 1.39 (colored) to selected 1.48.2.1 (colored)

whitespace and header sorting changes (Ingo Schwarze). No functional changes.

Revision 1.39 / (download) - annotate - [select for diffs], Tue Feb 16 22:53:14 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.38: +2 -3 lines
Diff to previous 1.38 (colored) to selected 1.48.2.1 (colored)

More header cleanups from Ingo Schwarze.

Revision 1.38 / (download) - annotate - [select for diffs], Tue Feb 16 19:08:41 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.37: +2 -3 lines
Diff to previous 1.37 (colored) to selected 1.48.2.1 (colored)

more include file cleanup (Ingo Schwarze)

Revision 1.37 / (download) - annotate - [select for diffs], Tue Feb 16 15:53:48 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.36: +2 -4 lines
Diff to previous 1.36 (colored) to selected 1.48.2.1 (colored)

From Ingo Scharze:
Let "el.h" include everything needed for struct editline,
and don't include that stuff multiple times.  That also improves
consistency, also avoids circular inclusions, and also makes it
easier to follow what is going on, even though not quite as nice.
But it seems like the best we can do...

Revision 1.36 / (download) - annotate - [select for diffs], Tue Feb 16 14:08:25 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.35: +3 -2 lines
Diff to previous 1.35 (colored) to selected 1.48.2.1 (colored)

cleanup chartype.h includes (Ingo Schwarze)

Revision 1.35 / (download) - annotate - [select for diffs], Tue Feb 16 14:06:05 2016 UTC (8 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.34: +3 -3 lines
Diff to previous 1.34 (colored) to selected 1.48.2.1 (colored)

cleanup inclusion of histedit.h (Ingo Schwarze)

Revision 1.32.2.1 / (download) - annotate - [select for diffs], Wed May 13 13:33:55 2015 UTC (8 years, 11 months ago) by martin
Branch: netbsd-7
CVS Tags: netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored) next main 1.33 (colored) to selected 1.48.2.1 (colored)

Sync lib/libedit with head, requested by christos in #753:

	lib/libedit/Makefile 1.53
	lib/libedit/chartype.h 1.13
	lib/libedit/editline.3 1.83-1.84
	lib/libedit/editrc.5 1.28-1.29
	lib/libedit/eln.c 1.18
	lib/libedit/filecomplete.c 1.33-1.34
	lib/libedit/readline.c 1.112-1.115

Man page improvements, fix overlapping strcpy, improve readline
compatibility, clang build fix.

Revision 1.34 / (download) - annotate - [select for diffs], Sat Oct 18 15:07:02 2014 UTC (9 years, 6 months ago) by riz
Branch: MAIN
Changes since 1.33: +3 -3 lines
Diff to previous 1.33 (colored) to selected 1.48.2.1 (colored)

callers's -> caller's

Revision 1.33 / (download) - annotate - [select for diffs], Sat Oct 18 08:33:23 2014 UTC (9 years, 6 months ago) by snj
Branch: MAIN
Changes since 1.32: +4 -4 lines
Diff to previous 1.32 (colored) to selected 1.48.2.1 (colored)

src is too big these days to tolerate superfluous apostrophes.  It's
"its", people!

Revision 1.31.8.1 / (download) - annotate - [select for diffs], Wed Aug 20 00:02:17 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-maxphys
Changes since 1.31: +4 -3 lines
Diff to previous 1.31 (colored) next main 1.32 (colored) to selected 1.48.2.1 (colored)

Rebase to HEAD as of a few days ago.

Revision 1.31.18.1 / (download) - annotate - [select for diffs], Sun Aug 10 06:51:57 2014 UTC (9 years, 8 months ago) by tls
Branch: tls-earlyentropy
Changes since 1.31: +4 -3 lines
Diff to previous 1.31 (colored) next main 1.32 (colored) to selected 1.48.2.1 (colored)

Rebase.

Revision 1.32 / (download) - annotate - [select for diffs], Thu Jun 5 22:07:42 2014 UTC (9 years, 10 months ago) by christos
Branch: MAIN
CVS Tags: tls-maxphys-base, tls-earlyentropy-base, netbsd-7-base
Branch point for: netbsd-7
Changes since 1.31: +4 -3 lines
Diff to previous 1.31 (colored) to selected 1.48.2.1 (colored)

PR/48876: Dmitriy Grigoryev: Core dump in readline lib on attempted expansion
Make sure we have 2 matches before calling strcmp().

Revision 1.31 / (download) - annotate - [select for diffs], Fri Sep 16 16:13:16 2011 UTC (12 years, 7 months ago) by plunky
Branch: MAIN
CVS Tags: yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, agc-symver-base, agc-symver
Branch point for: tls-maxphys, tls-earlyentropy
Changes since 1.30: +3 -3 lines
Diff to previous 1.30 (colored) to selected 1.48.2.1 (colored)

NULL does not need a cast, here

Revision 1.30 / (download) - annotate - [select for diffs], Tue Aug 16 16:25:15 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.29: +13 -10 lines
Diff to previous 1.29 (colored) to selected 1.48.2.1 (colored)

re-enable -Wconversion

Revision 1.29 / (download) - annotate - [select for diffs], Fri Jul 29 23:44:44 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.28: +3 -3 lines
Diff to previous 1.28 (colored) to selected 1.48.2.1 (colored)

pass -Wconversion

Revision 1.28 / (download) - annotate - [select for diffs], Fri Jul 29 20:58:07 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.27: +3 -7 lines
Diff to previous 1.27 (colored) to selected 1.48.2.1 (colored)

- fix unused params
- unconditionalize vis.h

Revision 1.27 / (download) - annotate - [select for diffs], Fri Jul 29 15:16:33 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.26: +8 -8 lines
Diff to previous 1.26 (colored) to selected 1.48.2.1 (colored)

KNF return (\1); -> return \1;

Revision 1.26 / (download) - annotate - [select for diffs], Thu Jul 28 20:50:55 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.25: +29 -25 lines
Diff to previous 1.25 (colored) to selected 1.48.2.1 (colored)

kill ptr_t and ioctl_t, add  * sizeof(*foo) to all allocations.

Revision 1.25 / (download) - annotate - [select for diffs], Thu Jul 28 17:33:55 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.24: +7 -4 lines
Diff to previous 1.24 (colored) to selected 1.48.2.1 (colored)

fix unused variable warnings on systems without _r functions

Revision 1.24 / (download) - annotate - [select for diffs], Thu Jul 28 00:50:23 2011 UTC (12 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.23: +19 -15 lines
Diff to previous 1.23 (colored) to selected 1.48.2.1 (colored)

eliminate alloca for portability
portable getpw{nam,uid}

Revision 1.23 / (download) - annotate - [select for diffs], Mon Dec 6 00:05:38 2010 UTC (13 years, 4 months ago) by dholland
Branch: MAIN
CVS Tags: matt-mips64-premerge-20101231, cherry-xenmp-base, cherry-xenmp, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2
Changes since 1.22: +16 -7 lines
Diff to previous 1.22 (colored) to selected 1.48.2.1 (colored)

Improve previous to avoid changing the interface of an externally
exposed function. (But note that this function is neither documented
nor declared in any installed header file, and it probably should not
be externally exposed.) Related to PR 44183, closes PR 44186.

Revision 1.22 / (download) - annotate - [select for diffs], Thu Dec 2 04:42:46 2010 UTC (13 years, 4 months ago) by dholland
Branch: MAIN
Changes since 1.21: +3 -3 lines
Diff to previous 1.21 (colored) to selected 1.48.2.1 (colored)

add const, from PR 44183.

Revision 1.21 / (download) - annotate - [select for diffs], Thu Dec 2 04:35:17 2010 UTC (13 years, 4 months ago) by dholland
Branch: MAIN
Changes since 1.20: +35 -28 lines
Diff to previous 1.20 (colored) to selected 1.48.2.1 (colored)

Fix up bodgy code for printing completion matches; it used to sometimes
skip entries, print (null), run off the end of the array, or occasionally
receive SIGSEGV, and now will, hopefully at least, do none of that.

Based in part on the patch in PR 44183 from Sergio Acereda; I also
did some tidyup and fixed it to print top-to-bottom first like ls(1).

Revision 1.20 / (download) - annotate - [select for diffs], Mon Nov 15 21:24:31 2010 UTC (13 years, 5 months ago) by christos
Branch: MAIN
Changes since 1.19: +3 -3 lines
Diff to previous 1.19 (colored) to selected 1.48.2.1 (colored)

don't increment i twice in the loop. From Michael Byrnes

Revision 1.19 / (download) - annotate - [select for diffs], Tue Jun 1 18:20:26 2010 UTC (13 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.18: +15 -8 lines
Diff to previous 1.18 (colored) to selected 1.48.2.1 (colored)

tidy up memory allocation and don't unnecessarily print "./" before names.

Revision 1.18 / (download) - annotate - [select for diffs], Mon Jan 18 19:17:42 2010 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.17: +4 -4 lines
Diff to previous 1.17 (colored) to selected 1.48.2.1 (colored)

PR/42637: Joachim Kuebart: Shell tab completion crashes due to libedit stack
smashing

Revision 1.17 / (download) - annotate - [select for diffs], Wed Dec 30 22:37:40 2009 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.16: +22 -18 lines
Diff to previous 1.16 (colored) to selected 1.48.2.1 (colored)

Wide character support (UTF-8) from Johny Mattsson; currently disabled.

Revision 1.16 / (download) - annotate - [select for diffs], Mon Dec 28 21:55:38 2009 UTC (14 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.15: +8 -5 lines
Diff to previous 1.15 (colored) to selected 1.48.2.1 (colored)

improve on the listing display by printing only one character after the
filename not two, and no trailing blanks. I will revisit this when I write
the ls-F code.

Revision 1.13.2.1 / (download) - annotate - [select for diffs], Wed May 13 19:18:29 2009 UTC (14 years, 11 months ago) by jym
Branch: jym-xensuspend
Changes since 1.13: +12 -12 lines
Diff to previous 1.13 (colored) next main 1.14 (colored) to selected 1.48.2.1 (colored)

Sync with HEAD.

Third (and last) commit. See http://mail-index.netbsd.org/source-changes/2009/05/13/msg221222.html

Revision 1.15 / (download) - annotate - [select for diffs], Mon Feb 16 00:15:45 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
CVS Tags: matt-premerge-20091211, jym-xensuspend-nbase, jym-xensuspend-base
Changes since 1.14: +3 -3 lines
Diff to previous 1.14 (colored) to selected 1.48.2.1 (colored)

fix sign compare issues.

Revision 1.14 / (download) - annotate - [select for diffs], Sun Feb 15 21:55:23 2009 UTC (15 years, 2 months ago) by christos
Branch: MAIN
Changes since 1.13: +11 -11 lines
Diff to previous 1.13 (colored) to selected 1.48.2.1 (colored)

pass lint on _LP64.

Revision 1.13 / (download) - annotate - [select for diffs], Mon Jan 26 17:32:41 2009 UTC (15 years, 2 months ago) by apb
Branch: MAIN
Branch point for: jym-xensuspend
Changes since 1.12: +8 -8 lines
Diff to previous 1.12 (colored) to selected 1.48.2.1 (colored)

Define HAVE_STRUCT_DIRENT_D_NAMLEN in config,h, and test it when
deciding whether to use entry->d_namlen or strlen(entry->d_name).
Addresses PR 40477 by Robert Millan.

Revision 1.12 / (download) - annotate - [select for diffs], Sun Jan 11 15:00:23 2009 UTC (15 years, 3 months ago) by christos
Branch: MAIN
Changes since 1.11: +4 -4 lines
Diff to previous 1.11 (colored) to selected 1.48.2.1 (colored)

- insert a space after the recognized string if it was an exact match
- initialize properly the string used for completion.
From Alex Bligh alex at alex dot org dot uk
- Make char constants consistent

Revision 1.10.16.1 / (download) - annotate - [select for diffs], Sun May 18 12:30:35 2008 UTC (15 years, 11 months ago) by yamt
Branch: yamt-pf42
Changes since 1.10: +2 -5 lines
Diff to previous 1.10 (colored) next main 1.11 (colored) to selected 1.48.2.1 (colored)

sync with head.

Revision 1.11 / (download) - annotate - [select for diffs], Tue Apr 29 06:53:01 2008 UTC (15 years, 11 months ago) by martin
Branch: MAIN
CVS Tags: yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-base2, hpcarm-cleanup-nbase
Changes since 1.10: +2 -5 lines
Diff to previous 1.10 (colored) to selected 1.48.2.1 (colored)

Convert to new 2 clause license

Revision 1.10 / (download) - annotate - [select for diffs], Thu Nov 9 16:58:38 2006 UTC (17 years, 5 months ago) by christos
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, keiichi-mipv6-base, keiichi-mipv6, hpcarm-cleanup-base, hpcarm-cleanup, cube-autoconf-base, cube-autoconf
Branch point for: yamt-pf42
Changes since 1.9: +15 -7 lines
Diff to previous 1.9 (colored) to selected 1.48.2.1 (colored)

don't use alloca with ssp.

Revision 1.9 / (download) - annotate - [select for diffs], Mon Aug 21 12:45:30 2006 UTC (17 years, 8 months ago) by christos
Branch: MAIN
Changes since 1.8: +3 -7 lines
Diff to previous 1.8 (colored) to selected 1.48.2.1 (colored)

Change to a 3 clause copyright after permission of the holders.

Revision 1.8 / (download) - annotate - [select for diffs], Wed Aug 3 13:41:38 2005 UTC (18 years, 8 months ago) by christos
Branch: MAIN
CVS Tags: abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.7: +3 -3 lines
Diff to previous 1.7 (colored) to selected 1.48.2.1 (colored)

Fix reversed test; from Gerry Swislow

Revision 1.7 / (download) - annotate - [select for diffs], Sat Jun 11 18:18:59 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.6: +7 -7 lines
Diff to previous 1.6 (colored) to selected 1.48.2.1 (colored)

PR/30500: Paul Shupak: Inconsistent definition of tilde_expand().
Provide a layer of indirection between the readline compatibility functions
and our internal implementation, so that we have the freedom to change the
function signature.

Revision 1.6 / (download) - annotate - [select for diffs], Fri Jun 10 20:21:00 2005 UTC (18 years, 10 months ago) by christos
Branch: MAIN
Changes since 1.5: +26 -27 lines
Diff to previous 1.5 (colored) to selected 1.48.2.1 (colored)

Bug reported from Martin Dietze:

    The place to change the completion_append_character is
    usually somewhere in the `rl_completion_entry_function'
    callback which is where one usually can distinguish between
    file- or dir-like entries to append a slash for dirs etc.

    This does no longer work since `fn_complete()' takes the
    `append_character' as argument before the callback is executed,
    so that changes to the variable `rl_completion_append_character'
    have in fact no effect for the current completion.

Fix by adding a function that returns the rl_completion_append_character,
when it gets passed in a filename in readline emulation.

Revision 1.5 / (download) - annotate - [select for diffs], Wed May 18 22:34:41 2005 UTC (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.4: +5 -3 lines
Diff to previous 1.4 (colored) to selected 1.48.2.1 (colored)

Make completion_matches non-static since readline wants it.

Revision 1.4 / (download) - annotate - [select for diffs], Thu May 12 15:48:40 2005 UTC (18 years, 11 months ago) by christos
Branch: MAIN
Changes since 1.3: +13 -7 lines
Diff to previous 1.3 (colored) to selected 1.48.2.1 (colored)

PR/30215: Kouichirou Hiratsuka: /bin/sh dumps core with tabcomplete
Don't core-dump when trying to complete an empty line; instead assume ./

Revision 1.3 / (download) - annotate - [select for diffs], Mon May 9 20:10:33 2005 UTC (18 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.2: +35 -32 lines
Diff to previous 1.2 (colored) to selected 1.48.2.1 (colored)

Use getpwuid_r(getuid(), ...) to expand ~/....
Don't replace ~xyz with /home/xyz when expanding ~

Revision 1.2 / (download) - annotate - [select for diffs], Sat May 7 16:28:32 2005 UTC (18 years, 11 months ago) by dsl
Branch: MAIN
Changes since 1.1: +3 -3 lines
Diff to previous 1.1 (colored) to selected 1.48.2.1 (colored)

gdb directly calls filename_completion_function()

Revision 1.1 / (download) - annotate - [select for diffs], Sat May 7 16:01:25 2005 UTC (18 years, 11 months ago) by dsl
Branch: MAIN
Diff to selected 1.48.2.1 (colored)

Separate out the filename completion functions from the readline() code.
Pass in loads of parameters instead of relying on shed-loads of global
variables to modify the behaviour.
The filename completion code can now be enabled by code that uses el_gets().
(eg /bin/sh)

This form allows you to request diff's between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.




CVSweb <webmaster@jp.NetBSD.org>