Update cheatsheets

This commit is contained in:
ivuorinen
2024-10-21 00:18:03 +00:00
parent 1d688aded3
commit b361fd494d
14 changed files with 123 additions and 18 deletions

29
tldr/bear Normal file
View File

@@ -0,0 +1,29 @@
---
syntax: markdown
tags: [tldr, common]
source: https://github.com/tldr-pages/tldr.git
---
# bear
> A tool to generate compilation databases for `clang` tooling.
> More information: <https://github.com/rizsotto/Bear>.
- Generate `compile_commands.json` by running a build command:
`bear -- {{make}}`
- Generate compilation database with a custom output file name:
`bear --output {{path/to/compile_commands.json}} -- {{make}}`
- Append results to an existing `compile_commands.json` file:
`bear --append -- {{make}}`
- Run in verbose mode to get detailed output:
`bear --verbose -- {{make}}`
- Force `bear` to use the preload method for command interception:
`bear --force-preload -- {{make}}`