Questions tagged [ag]

The Silver Searcher, better known as Ag is a tool similar to ack.

The Silver Searcher, better known as Ag is an open-source tool similar to created and maintained by Geoff Greer.

115 questions
1
vote
1 answer

How to have ag ignore files with certain extensions (e.g. *.dtd) normally looked at for a given option such as --xml?

Ag works fine most of the time. But sometimes, I want to do a search in, say, all XML files by using --xml, but not any .dtd files. Unfortunately, ag looks at .dtd files when asked to examine --xml. I tried as a wild guess ag --no-dtd. Doesn't…
DarenW
  • 16,549
  • 7
  • 63
  • 102
1
vote
2 answers

Why would ag (silver searcher) in vim ignore files with emojis?

Some files stopped appearing when using the silver searcher in vim... and I just figured out that it happens when certain emoji combinations are inside the file. Even if those emojis are further down, after the term I'm looking for, the file doesn't…
Alisso
  • 1,861
  • 1
  • 17
  • 32
1
vote
5 answers

How to run commands you can run on terminal in Java

So guys I want to execute a command that you can execute on the cmd in my Java program. After doing some study, I thought i found a way to do this. However, my code doesn't work. My code is import java.io.*; public class CmdTest { public…
Sid
  • 103
  • 1
  • 2
  • 12
1
vote
1 answer

agignore not respecting nested forlder

my directory structure is like this: roo | node_modules | packages | project1 | lib node_modules project2 | …
dagda1
  • 26,856
  • 59
  • 237
  • 450
1
vote
1 answer

How can I search only files that start with a certain character using ag?

Let's say I have two files in a directory: .test test.txt How can I limit my ag search to only files that begin with a .? I have tried a number of patterns, but none worked.
a-b-r-o-w-n
  • 515
  • 2
  • 17
1
vote
2 answers

Why do my results appear to differ between ag and grep?

I'm having trouble correctly (and safely) executing the right regex searches with grep. I seem to be able to do what I want using ag What I want to do in plain english: Search my current directory (recursively?) for files that have lines containing…
wcpines
  • 15
  • 4
1
vote
1 answer

How to search call trees in large codebases?

I'm trying to find if functionX is ever called by functionY by way of any other number of functions (let's call them functionA, functionB, and functionC) in a large codebase that fortunately does not make excessive use of callback functions. I'm…
tarabyte
  • 17,837
  • 15
  • 76
  • 117
1
vote
1 answer

using ag in emacs under macos

I use project-root to setup root directory of the project as: (setq project-roots `(("Git Project" :root-contains-files (".gitignore")))) Then I go into my git project directory (e.g ~/.emacs.d), and press M-x ag-project-files and…
ruanhao
  • 4,663
  • 6
  • 28
  • 43
1
vote
1 answer

ag Silver Searcher: List ignored/searched files

ag provides multiple mechanisms for ignoring files (hidden files, VCS ignored files, .agignore ...). These are quite helpful, but sometimes this makes me wonder which files in my file tree are actually ignored / searched. Is there a quick way to…
aosho235
  • 123
  • 1
  • 2
  • 15
1
vote
1 answer

Vim Ag Plugin Context Option and Show Results in Tab

I am using Gvim with Ag.vim plugin for search. I am trying to use options for --before 4 and --after 4 to get the context of the code. It returns the results in quickfix window as a single line. How to show the before and after code for a search…
NotepadPlusPlus PRO
  • 987
  • 1
  • 8
  • 21
1
vote
1 answer

Silver Searcher: Excluding files in vimrc

Is there a way to exclude files from an ag search by adding an array of files to the vimrc file? Like with FuzzyFinder, file extensions are ignored by adding this: let g:fuf_file_exclude = '\v\~$|\.o$|\.exe$|\.bak$|\.swp$|\.class$' I actually just…
Daniel Florido
  • 79
  • 2
  • 12
1
vote
2 answers

Expand command line exclude pattern with zsh

I'm trying to pass a complicated regex as an ignore pattern. I want to ignore all subfolders of locales/ except locales/US/en/*. I may need to fallback to using a .agignore file, but I'm trying to avoid that. I'm using silver searcher (similar to…
Jamis Charles
  • 5,827
  • 8
  • 32
  • 42
1
vote
1 answer

How to run Ag asynchronously with vimproc and quickrun - VIM?

I'm using Ag, vimproc, quickrun I'm able to run .php asynchronously with this settings in my .vimrc nnoremap r :QuickRun let g:quickrun_config = get(g:, 'quickrun_config', {}) let g:quickrun_config = { \ "_" : { \ 'runner': …
whitesiroi
  • 2,725
  • 4
  • 30
  • 64
0
votes
0 answers

Publish a message to AWS SNS topic on on_failure_callback from DAG

I have a DAG that I have deployed on astro.In the DAG I have on_failure_callback as the default parameter on the dag level and I am calling a method that publishes to the aws sns topic when the dag fail, However, I am getting this error. Has someone…
0
votes
0 answers

Add line breaks to Dash AG grid custom tooltip

I added a custom tooltip to my Dash AG grid according to these instructions: https://dash.plotly.com/dash-ag-grid/tooltips. Now, the cell that contains my tooltip data may have one or multiple line breaks (indicated by \n), and they are ignored in…
Jordi
  • 361
  • 1
  • 4
  • 14