Update cheatsheets

This commit is contained in:
ivuorinen
2024-12-07 00:18:38 +00:00
parent 183ddc3482
commit 41adea57aa
2 changed files with 11 additions and 11 deletions

View File

@@ -13,13 +13,13 @@ source: https://github.com/tldr-pages/tldr.git
`fd "{{string|regex}}"` `fd "{{string|regex}}"`
- Find files that begin with `foo`: - Find files that begin with a specific string:
`fd "^foo"` `fd "{{^string}}"`
- Find files with a specific extension: - Find files with a specific extension:
`fd --extension txt` `fd --extension {{txt}}`
- Find files in a specific directory: - Find files in a specific directory:

View File

@@ -16,25 +16,25 @@ source: https://github.com/tldr-pages/tldr.git
`zig build run` `zig build run`
- Initialize a `zig build` application: - Initialize a `zig build` project with library and executable:
`zig init-exe` `zig init`
- Initialize a `zig build` library:
`zig init-lib`
- Create and run a test build: - Create and run a test build:
`zig test {{path/to/file.zig}}` `zig test {{path/to/file.zig}}`
- Cross compile, build and run a project for `x86_64` architecture and `windows` operating system:
`zig build run -fwine -Dtarget=x86_64-windows`
- Reformat Zig source into canonical form: - Reformat Zig source into canonical form:
`zig fmt {{path/to/file.zig}}` `zig fmt {{path/to/file.zig}}`
- Use Zig as a drop-in C compiler: - Translate a C file to `zig`:
`zig cc {{path/to/file.c}}` `zig translate-c -lc {{path/to/file.c}}`
- Use Zig as a drop-in C++ compiler: - Use Zig as a drop-in C++ compiler: