From 97a2c32a841f06ccee7a2ec2805fa709c1a8b37d Mon Sep 17 00:00:00 2001 From: Fangrui Song Date: Sat, 16 Dec 2023 13:36:22 -0800 Subject: [PATCH] Project-Setup: add a jq tip --- Project-Setup.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Project-Setup.md b/Project-Setup.md index fce5155..80c802a 100644 --- a/Project-Setup.md +++ b/Project-Setup.md @@ -72,6 +72,11 @@ If your `compile_commands.json` is not kept in the project root, set the initialization option `compilationDatabaseDirectory` to an alternative directory containing `compile_commands.json`. +You can use jq to concatenate multiple `compile_commands.1.json` fragments: +``` +cat a/compile_commands.json b/compile_commands.json | jq '.[]' | jq -s '.' > compile_commands.json +``` + ### [CMake](https://cmake.org/) ```zsh