diff options
author | 2018-11-26 16:56:58 -0500 | |
---|---|---|
committer | 2018-11-26 16:56:58 -0500 | |
commit | 24de6b2672d6f653e7d0691482e96bfc43b179ef (patch) | |
tree | 5d18ad318437d3209ccb4c5b8d59a6d2ec95e27c /modules/textadept/find.lua | |
parent | cfb7aee3491245e62d81aac8f9d3948ca19af266 (diff) | |
download | textadept-24de6b2672d6f653e7d0691482e96bfc43b179ef.tar.gz textadept-24de6b2672d6f653e7d0691482e96bfc43b179ef.zip |
Changed filter format to be more flat and intuitive.
Filters are now simply lists of inclusive and exclusive patterns.
Added temporary compatibility and notice for old-style filters.
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r-- | modules/textadept/find.lua | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 53fb8498..815b4c66 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -206,20 +206,13 @@ end -- prints the results to a buffer titled "Files Found", highlighting found text. -- Use the `find_text`, `match_case`, `whole_word`, and `regex` fields to set -- the search text and option flags, respectively. --- A filter is a table that contains: --- --- + Lua patterns that match filenames to exclude. --- + Optional `folders` sub-table that contains patterns matching directories --- to exclude. --- + Optional `extensions` sub-table that contains raw file extensions to --- exclude. --- + Optional `symlink` flag that when `true`, excludes symlinked files (but --- not symlinked directories). --- + Optional `folders.symlink` flag that when `true`, excludes symlinked --- directories. --- --- Any filter patterns starting with '!' exclude files and directories that do --- not match the pattern that follows. +-- A filter determines which files to search in, with the default filter being +-- `lfs.default_filter`. A filter consists of Lua patterns that match filenames +-- to include or exclude. Exclusive patterns begin with a '!'. If no inclusive +-- patterns are given, any filename is initially considered. As a convenience, +-- file extensions can be specified literally instead of as a Lua pattern (e.g. +-- '.lua' vs. '%.lua$'), and '/' also matches the Windows directory separator +-- ('[/\\]' is not needed). -- If *filter* is `nil`, the filter from the `ui.find.find_in_files_filters` -- table is used. If that filter does not exist, `lfs.default_filter` is used. -- @param dir Optional directory path to search. If `nil`, the user is prompted |