The NetBSD Project

CVS log for src/lib/libedit/TEST/test_filecompletion.c

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

Request diff between arbitrary revisions


Default branch: MAIN


Revision 1.3.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.3.2.1: +39 -39 lines
Diff to previous 1.3.2.1 (colored) to branchpoint 1.3 (colored) next main 1.4 (colored)

Mostly merge changes from HEAD upto 20200411

Revision 1.5 / (download) - annotate - [select for diffs], Sun Sep 8 05:50:58 2019 UTC (4 years, 7 months ago) by abhinav
Branch: MAIN
CVS Tags: phil-wifi-20200421, phil-wifi-20200411, phil-wifi-20200406, phil-wifi-20191119, 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, is-mlppp-base, is-mlppp, cjep_sun2x-base1, cjep_sun2x-base, cjep_sun2x, cjep_staticlib_x-base1, cjep_staticlib_x-base, cjep_staticlib_x, HEAD
Changes since 1.4: +39 -39 lines
Diff to previous 1.4 (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.3.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.3: +89 -72 lines
Diff to previous 1.3 (colored)

Sync with HEAD

Revision 1.4 / (download) - annotate - [select for diffs], Sun Mar 31 03:04:57 2019 UTC (5 years ago) by abhinav
Branch: MAIN
CVS Tags: phil-wifi-20190609, 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.3: +89 -72 lines
Diff to previous 1.3 (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.2.2.1 / (download) - annotate - [select for diffs], 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.2: +22 -1 lines
Diff to previous 1.2 (colored) next main 1.3 (colored)

Sync with HEAD

Revision 1.3 / (download) - annotate - [select for diffs], Fri May 4 16:39:15 2018 UTC (5 years, 11 months ago) by abhinav
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.2: +22 -1 lines
Diff to previous 1.2 (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.2 / (download) - annotate - [select for diffs], Sun Oct 15 19:17:30 2017 UTC (6 years, 6 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.1: +31 -8 lines
Diff to previous 1.1 (colored)

Add copyright and rcs header to the test program.
Also, remove a test case which was not supposed to be there.
(While that test case works with the changes I committed, testing that
 test case with the test program is not possible in its current form. I'm
 working on that.)

Revision 1.1 / (download) - annotate - [select for diffs], Sun Oct 15 18:59:00 2017 UTC (6 years, 6 months ago) by abhinav
Branch: MAIN

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.

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>