#42 locate: add --ignore-spaces option to ignore word separators
Opened by marcotrevisan. Modified
marcotrevisan/mlocate ignore-separators  into  master

Download 42.patch

It allows to locate in files ignoring in-words separators, such as punctuation and spaces, so searching "foo-bar" is like searching for "foo bar", "foo_bar" or "foo?bar".

This is not compatible with regex.

This PR has https://pagure.io/mlocate/pull-request/41 as perequisite.

11 new commits added

  • locate: add --ignore-spaces option to ignore word separators
  • locate: escape transliterated meta chars if regex is enabled
  • locate: allocate less space for transliterated, realloc if needed
  • locate: only allocate memory if needed in transliteration
  • locate: take in account inlen value when transliterating string
  • locate: don't even try to transliterate ascii strings
  • locate: transliterate strings by char and do it on valid results only
  • locate: ignore transliterated strings only with replacement chars
  • locate: only add and check transliterated patterns if needed
  • doc: add -t / --transliterate to man page
  • locate: add --transliterate support using iconv to match accented

12 new commits added

  • locate: add --ignore-spaces option to ignore word separators
  • locate: update test to match new help
  • locate: escape transliterated meta chars if regex is enabled
  • locate: allocate less space for transliterated, realloc if needed
  • locate: only allocate memory if needed in transliteration
  • locate: take in account inlen value when transliterating string
  • locate: don't even try to transliterate ascii strings
  • locate: transliterate strings by char and do it on valid results only
  • locate: ignore transliterated strings only with replacement chars
  • locate: only add and check transliterated patterns if needed
  • doc: add -t / --transliterate to man page
  • locate: add --transliterate support using iconv to match accented

12 new commits added

  • locate: add --ignore-spaces option to ignore word separators
  • locate: update test to match new help
  • locate: escape transliterated meta chars if regex is enabled
  • locate: allocate less space for transliterated, realloc if needed
  • locate: only allocate memory if needed in transliteration
  • locate: take in account inlen value when transliterating string
  • locate: don't even try to transliterate ascii strings
  • locate: transliterate strings by char and do it on valid results only
  • locate: ignore transliterated strings only with replacement chars
  • locate: only add and check transliterated patterns if needed
  • doc: add -t / --transliterate to man page
  • locate: add --transliterate support using iconv to match accented
Metadata