discodwhich is short for DISCO(the name of my team) detective is aclitool when given a list ofgitbranches and a search criteria will perfom a search on one branch at a time and go through all the branches in the list printing filenames and line numbers that match the search criteria.
discod makes use of ripgrep which is a search tool with more features and better perfomance than grep.
Run the following command to install it.
$ brew install ripgrepYou are now ready to install discod from npm
$ npm install -g discod
discod will start the search from the directory you run it from. Make sure you are in a repo that is not dirty i.e no uncommitted/unstashed changes.
To edit the list of git branches to search through, run the following command
discod --edit-list #this will open up a text file in your default editorAfter updating your branch list run this inside the directory you want the search to start from.
discod searchTerm [fileExtension]MIT © Tekeste