Questions tagged [ack]

ack is a tool like grep, designed for programmers with large trees of heterogeneous source code.

ack is a tool like grep, designed for programmers with large trees of heterogeneous source code. http://beyondgrep.com

262 questions
3
votes
2 answers

Set Ack to look in handlebars files

I have Ack set up in Vim but at the moment it does not search in .handlebars files. Does anyone know how I can add handlebars to the file list?
dagda1
  • 26,856
  • 59
  • 237
  • 450
3
votes
2 answers

copy SVN modified files including directory to a another directory

I have a list of files in my current working copy that have been modified locally. There are about 50 files that have been changed. I am using the following command to copy files that have been modified in subversion to a folder called /backup. Is…
crmpicco
  • 16,605
  • 26
  • 134
  • 210
3
votes
5 answers

copy SVN modified files only to another directory

I have a list of files in my current working copy that have been modified locally. There are about 50 files that have been changed. I can get a list of these files by doing this: svn st | ack '^M' Is there a way I can copy these files and only…
crmpicco
  • 16,605
  • 26
  • 134
  • 210
2
votes
2 answers

How do I search for the string '--branch' using ack?

In ack you can use the -Q option to escape all the characters in your search string, but that doesn't seem to work if the search string you are using looks like an option for ack. I am trying to search a group of files for the string '--branch'. So…
bryan kennedy
  • 6,969
  • 5
  • 43
  • 64
2
votes
1 answer

Using ACK as a Filter

I've been using ACK for searching my code base, and it's a wonderful tool. However, it has (in my opinion) one important limitation - it does not allow multi-line matching of regular expressions. To overcome that limitation, I'd like to filter a set…
Óscar López
  • 232,561
  • 37
  • 312
  • 386
2
votes
3 answers

How to use ack with M-x find-grep?

Leaving question here for reference. The Lord alone knows why, but whereas once upon a time this didn't work for me, prompting me to ask this question, today it does. Typical bloody emacs. Also typically, it is an utter joy once you've wrestled with…
John Lawrence Aspden
  • 17,124
  • 11
  • 67
  • 110
2
votes
1 answer

Slack Bolt await ack() - asynchronous

I am trying to implement a task creation workflow using slack modal. The task creation workflow sometimes takes more than 3 seconds to execute and come up with the result. So, based on the documentation, I called await ack() to acknowledge at the…
2
votes
1 answer

Ag / Grep Exact Match Only Search

I am having an issue with using Ag (The Silver Searcher)... In the docs it says to use -Q for exact match, but I don't understand why it does not work for my purposes. If I type something like ag -Q actions or ag -Q 'actions' into my terminal, it…
Lushmoney
  • 412
  • 11
  • 26
2
votes
1 answer

Is there a way to set ignore case in .ackrc file

I want to ignore case by default without having to specify "-i" option everytime I run "ack" command. Is there a way to do it in .ackrc file?
Naveen Gara
  • 345
  • 2
  • 13
2
votes
1 answer

ack: Escape single quotes while providing regex

I am using ack to search for all values of width enclosed within single or double quotes. Ex: width="23" , width='420' RegEx Pal confirms /width=("|')\d+\1/g is the right regex for the job. I am however finding it difficult to supply this regex to…
2
votes
2 answers

Python socket.io ack function

In JS socket.io, there's the third param in the emit function of client: client.emit("event name",{some:"data"},function myack(value){ }) The myack function is passed to server and called with some returning value: //server…
Dee
  • 7,455
  • 6
  • 36
  • 70
2
votes
3 answers

Can ack/ag/grep print function name?

Is it possible to print the function or class name in which a keyword occurs when using ack or ag? This is something I have highly desired for quite some time. I think it would be quite tricky, as different programming languages have different ways…
shivams
  • 923
  • 12
  • 27
2
votes
1 answer

Reliably checking wget log for errors using grep or ack

In a bash file, I have logfileA.txt that contains output from wget that I'd like to run grep on to check for any instances of the words "error" or "fail", etc, as so: grep -ni --color=never -e "error" -e "fail" logfileA.txt | awk -F: '{print "Line…
nooblag
  • 678
  • 3
  • 23
2
votes
1 answer

ack fails in cronjob but runs fine from commandline

I'm using ack as part of a bash script to build a list of MP4 files from a mysqldump. The dump file is about 15mb. Here's my line: ack -o "https??://cdn.host.com\S+?\.mp4" /home/me/.dump.sql > /home/me/.mp4-matches.txt It works fine when running…
nooblag
  • 678
  • 3
  • 23
2
votes
3 answers

Ack dooesn't show the line number when i search in the single file

example) When I search the exec in proc.c file, $ ack allocproc proc.c allocproc(void) p = allocproc(); if((np = allocproc()) == 0){ // Return to "caller", actually trapret (see allocproc). but when I search in the whole directory, $ ack…
MangoTatsy
  • 173
  • 1
  • 13