If we're talking about shell grep, it's wise always to quote the search
string, (which kind of quote is preferable depends on which OS/shell),
whether it has special characters or not. If it's redundant, no harm done.
If it isn't, you don't have to guess how the shell molested your string
--
--
On 2020-10-11, @lbutlr wrote:
> On 11 Oct 2020, at 06:22, Bram Moolenaar wrote:
>> You can use any special character to surround the pattern, it's a lot
>> easier than escaping. I often use ":grep /pattern/ *", unless the
>> pattern contains a slash.
> As soon as I learned you could use any del
On 11 Oct 2020, at 06:22, Bram Moolenaar wrote:
> You can use any special character to surround the pattern, it's a lot
> easier than escaping. I often use ":grep /pattern/ *", unless the
> pattern contains a slash.
As soon as I learned you could use any delimiter you wanted I stopped using /
a
> On 2020-10-11, Shlomi Fish wrote:
> > On Sat, 10 Oct 2020 21:09:26 - (UTC)
> > Lifepillar wrote:
> >
> >> How can I grep text with a special symbol, such as #?
> >
> > Either:
> >
> > :grep \\#p
> >
> > Or:
> >
> > :grep '\#p'
> >
> > Seem to work here in gvim (Linux; shell is eit
On 2020-10-11, Shlomi Fish wrote:
> On Sat, 10 Oct 2020 21:09:26 - (UTC)
> Lifepillar wrote:
>
>> How can I grep text with a special symbol, such as #?
>
> Either:
>
> :grep \\#p
>
> Or:
>
> :grep '\#p'
>
> Seem to work here in gvim (Linux; shell is either bash or zsh).
That does
Hi, Life!
On Sat, 10 Oct 2020 21:09:26 - (UTC)
Lifepillar wrote:
> How can I grep text with a special symbol, such as #?
>
> I would like to search a bunch of files containing various #tags, but if
> I try from the command line:
>
> :grep #sometag
>
> that does not work. Escaping the
How can I grep text with a special symbol, such as #?
I would like to search a bunch of files containing various #tags, but if
I try from the command line:
:grep #sometag
that does not work. Escaping the hash causes grep to exit with an error:
:grep \#sometag
Any idea?
Thanks,
Life.