support -e to specify pattern
Bug #591233 reported by
Brian de Alwis
This bug affects 1 person
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
bzr-grep |
Confirmed
|
Wishlist
|
Unassigned |
Bug Description
It would be most excellent if bzr-grep supported a '-e' switch to explicitly specify the pattern.
I recently had to back out to using plain grep as my pattern began with a '-' and so was being interpreted for a switch.
To post a comment you must log in.
Hi Brian,
Escaping "-" seems to allows the patterns starting with "-" to be searched. E.g.
[grep]% bzr grep "\-grep" plugins/ grep plugins/ grep
INSTALL:'bzr-grep' is a bazaar plugin so you need to install it
INSTALL: $ bzr branch lp:bzr-grep ~/.bazaar/
INSTALL: $ mv bzr-grep ~/.bazaar/
Is the above behavior suitable to cover your use case or are there
some other common cases that we need to cover? I ask as I haven't
used -e before and grep man page wasn't very helpful with examples.
[1] http:// docs.python. org/library/ re.html# regular- expression- syntax