You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
at matched the blank line even though the literal q was part of the pattern
This happened on cygwin ( not significant as it happens on Linux also appended below)
cloned and compiled from source
Minor patch to get it to compile on cygwin ( see below )
This was reduced from a more realistic pattern, but ag should not match and print the blank line, just the line with the q
Tried with a '.*' prefix, ' *' ( zero or more spaces ) and no prefix - those all work
I had started by anchoring to the beginning of the line - ( e.g. '^\s+q' but it's broken in that case also )
$ ( echo "" ; echo q ) > q && ./ag '\s*q' q
1:
2:q
$ ./ag --version
ag version 2.2.0
Features:
+jit +lzma +zlib
expected just one line to print
$ perl -nle 'print if /^\s*q/' q
q
$ grep -P '^\s*q' q
q
$ ( echo "" ; echo q ) > q && ack '\s*q' q
q
$ ag --version
ag version 2.1.0
Features:
+jit +lzma +zlib
$ ack --version
ack 2.22
Running under Perl 5.30.3 at /usr/bin/perl.exe
Copyright 2005-2017 Andy Lester.
This program is free software. You may modify or distribute it
under the terms of the Artistic License v2.0.
diff --git a/src/main.c b/src/main.c
index e116f70..763cb51 100644
--- a/src/main.c
+++ b/src/main.c
@@ -154,7 +154,7 @@ int main(int argc, char **argv) {
}
#if defined(HAVE_PTHREAD_SETAFFINITY_NP) && (defined(USE_CPU_SET) || defined(HAVE_SYS_CPUSET_H))
if (opts.use_thread_affinity) {
-#if defined(__linux__) || defined(__midipix__)
+#if defined(__CYGWIN__) || defined(__linux__) || defined(__midipix__)
cpu_set_t cpu_set;
#elif __FreeBSD__
cpuset_t cpu_set;
dcd@jetson:~$ ag --version
ag version 2.1.0
Features:
+jit +lzma +zlib
dcd@jetson:~$ ( echo "" ; echo q ) > q && ag -i '\s*q' q
1:
2:q
dcd@jetson:~$ uname -a
Linux jetson 4.9.140-tegra #1 SMP PREEMPT Wed Mar 13 00:32:22 PDT 2019 aarch64 aarch64 aarch64 GNU/Linux
The text was updated successfully, but these errors were encountered:
at matched the blank line even though the literal q was part of the pattern
This happened on cygwin ( not significant as it happens on Linux also appended below)
cloned and compiled from source
Minor patch to get it to compile on cygwin ( see below )
This was reduced from a more realistic pattern, but ag should not match and print the blank line, just the line with the q
Tried with a '.*' prefix, ' *' ( zero or more spaces ) and no prefix - those all work
I had started by anchoring to the beginning of the line - ( e.g. '^\s+q' but it's broken in that case also )
The text was updated successfully, but these errors were encountered: