Giter Site home page Giter Site logo

Comments (3)

dajva avatar dajva commented on May 26, 2024 1

Spaces are escaped to allow for search terms with spaces in them. This comes from emacs builtin read input functions.
If you don't want to use type C-u every time you can define your own wrapper:

(defun my-rg ()
  (interactive)
  (let ((current-prefix-arg '(4)))
    (call-interactively #'rg)))

from rg.el.

dajva avatar dajva commented on May 26, 2024

rg-command-line-flags is a global variable so it's suited for flags you want in every search.
It's customizable by doing M-x customize-group RET rg RET and adding flags under the Rg Command Line Flags setting.

If you want to add a flag for a single search you can use the prefix argument C-u to the rg command. That will let you edit the full command line before it's executed.

from rg.el.

it6 avatar it6 commented on May 26, 2024

I see a \ being added to the -w flag when I try to add flag without using C-u this is causing the search to fail is there anyway we can enable this feature without pressing C-u

This throws an error as mentioned above

rg --color always --colors match:fg:red --type less --no-heading --type-add 'gn:*.gn' --type-add 'gn:*.gni' --type-add 'gyp:*.gyp' --type-add 'gyp:*.gypi' -i -w\ onboarding

This works as expected

rg --color always --colors match:fg:red --type less --no-heading --type-add 'gn:*.gn' --type-add 'gn:*.gni' --type-add 'gyp:*.gyp' --type-add 'gyp:*.gypi' -i -w onboarding

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.