Giter Site home page Giter Site logo

Comments (4)

dajva avatar dajva commented on June 24, 2024

Thanks for the report. Yes I think the -0 would probably work fine here. I guess we could use that for the --no-heading setup that you are using.

from rg.el.

dajva avatar dajva commented on June 24, 2024

After some testing I think -0 would be problematic mainly since it would be cumbersome to get rid of those ugly null chars in the output. TBH, I have not really crafted these regexps myself and never put much thought into it. I think it actually makes more sense to be restrictive with the kind of stuff that is allowed in file names, iow doing something like [^:]+ for matching the filename part. This seems to be what grep.el is doing anyway so should be fine to be in line with that.

from rg.el.

mbunkus avatar mbunkus commented on June 24, 2024

Thank you for looking into it. I really appreciate it.

Yeah I figured having \0 in the output being bad, or at least requiring somewhat of a big-ish rewrite.

Like I said above I'd be perfectly fine with not allowing : as part of the file name, whatever regex you do it with. [^:]+ looks absolutely reasonable. I do know that : are allowed as part of file names on non-Windows systems, but then again I don't think this matters much wrt. to rg. We (as in: the collective users of rg) usually use it with code, with system configuration, maybe text archives. In each of those cases I've never seen : to be part of the file name. They're usually only used with system files, e.g. stuff in /tmp maybe.

The one exception that comes to mind is maildir directories.

Soooo… maybe making it configurable would be best? Or even toggle-able from the *rg* buffers?

from rg.el.

dajva avatar dajva commented on June 24, 2024

Pushed a fix now without configuration possibilities. Let's add that if people request it.

from rg.el.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.