Normalize bash prompts and flake descriptions.

pull/11/head
Joshua Potter 2023-12-01 10:12:16 -07:00
parent 42e71e6493
commit 9f8f33aff9
12 changed files with 53 additions and 38 deletions

View File

@ -40,10 +40,10 @@ touch "$OUT/$FILENAME"
Running `bootstrap` with these two files configured will invoke the following
interactive script:
```bash
$> bootstrap touch
$ bootstrap touch
What file should I create for you? hello-world.txt
Creating hello-world.txt
$> ls
$ ls
... hello-world.txt ...
```
You should now see a new `hello-world.txt` file in your current working
@ -75,7 +75,7 @@ If flakes is not enabled or your nix version does not support
If you do not have Nix or prefer building from source, clone this repository and
run
```bash
$> make BUILD=release
$ make BUILD=release
```
The `bootstrap` binary will be made available in `dist/release` by default.
@ -217,7 +217,7 @@ the project for your own purposes.
We use [Sput](https://www.use-strict.de/sput-unit-testing/) for unit tests. To
run tests, type:
```bash
$> make test
$ make test
```
Tests are located in the `test` directory. `test/suites.c` serves as the
entrypoint for the test runner.
@ -228,8 +228,8 @@ We use [doxygen](https://www.doxygen.nl/index.html) for documentation
generation. Run either of the following two commands to generate documentation
locally:
```bash
$> make docs
$> doxygen
$ make docs
$ doxygen
```
### Formatting

View File

@ -5,7 +5,7 @@ the [clang](https://clang.llvm.org/) (version 16.0.6) toolchain. [direnv](https:
can be used to launch a dev shell upon entering this directory (refer to
`.envrc`). Otherwise run via:
```bash
$> nix develop
$ nix develop
```
## Language Server
@ -19,7 +19,7 @@ must be generated. For this reason, [bear](https://github.com/rizsotto/Bear)
(version 3.1.3) is included in this flake. Use as follows to generate a
`compile_commands.json` file:
```bash
$> bear -- <your-build-command>
$ bear -- <your-build-command>
```
## Documentation
@ -28,7 +28,7 @@ Documentation is generated using [Doxygen](https://www.doxygen.nl/index.html)
(version 1.9.7). (Re)generate documentation by editing the `Doxyfile` and
running:
```bash
$> doxygen
$ doxygen
```
## Formatting
@ -38,7 +38,7 @@ Formatting depends on the [clang-format](https://clang.llvm.org/docs/ClangFormat
A `pre-commit` hook is included in `.githooks` that can be used to format all
`*.c` and `*.h` files prior to commit. Install via:
```bash
$> git config --local core.hooksPath .githooks/
$ git config --local core.hooksPath .githooks/
```
If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory.

View File

@ -2,8 +2,11 @@
description = ''
An opinionated clang flake.
To generate a copy of this template elsewhere, run:
$> bootstrap clang
To generate a copy of this template elsewhere, install
[bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap clang
```
'';
inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a working environment for Elixir development
tool. [direnv](https://direnv.net/) can be used to launch a dev shell upon
entering this directory (refer to `.envrc`). Otherwise run via:
```bash
$> nix develop
$ nix develop
```
## Dependencies
@ -30,7 +30,7 @@ Formatting depends on the `mix format` task. A `pre-commit` hook is included in
`.githooks` that can be used to format all `*.exs?` files prior to commit.
Install via:
```bash
$> git config --local core.hooksPath .githooks/
$ git config --local core.hooksPath .githooks/
```
If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory.

View File

@ -2,8 +2,11 @@
description = ''
An opinionated mix flake.
To generate a copy of this template elsewhere, run:
> bootstrap mix
To generate a copy of this template elsewhere, install
[bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap mix
```
'';
inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a environment for Elixir development
(version 1.7.10) framework. [direnv](https://direnv.net/) can be used to launch
a dev shell upon entering this directory (refer to `.envrc`). Otherwise run via:
```bash
$> nix develop
$ nix develop
```
## Quickstart
@ -13,27 +13,27 @@ $> nix develop
An empty Postgres cluster is initialized at `/db`. To start the database, run
the following:
```bash
$> pg_ctl -D db -l db/logfile -o --unix_socket_directories=@phoenix start
$ pg_ctl -D db -l db/logfile -o --unix_socket_directories=@phoenix start
```
In the above command, `@phoenix` refers to an [abstract socket name](https://www.postgresql.org/docs/15/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES).
Rename to whatever is appropriate for your use case. To then connect to this
database instance, run:
```bash
$> psql -h @phoenix
$ psql -h @phoenix
```
To later shut the database down, run:
```bash
$> pg_ctl -D db stop
$ pg_ctl -D db stop
```
Afterward, you can run the Phoenix setup commands:
```bash
$> mix ecto.setup
$> mix assets.setup
$ mix ecto.setup
$ mix assets.setup
```
and then start the local server:
```bash
$> mix phx.server
$ mix phx.server
```
## Dependencies
@ -41,7 +41,7 @@ $> mix phx.server
This project pins Mix dependencies using [mix2nix](https://github.com/ydlr/mix2nix).
After updating your `mix.lock` file, make sure to re-run the following:
```bash
$> mix2nix > deps.nix
$ mix2nix > deps.nix
```
As of now, `mix2nix` cannot handle git dependencies found inside the `mix.lock`
file. If you have git dependencies, add them manually or use
@ -58,7 +58,7 @@ Formatting depends on the `mix format` task. A `pre-commit` hook is included in
`.githooks` that can be used to format all `*.exs?` files prior to commit.
Install via:
```bash
$> git config --local core.hooksPath .githooks/
$ git config --local core.hooksPath .githooks/
```
If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory.

View File

@ -2,8 +2,11 @@
description = ''
An opinionated pheonix flake.
To generate a copy of this template elsewhere, run:
$> bootstrap phoenix
To generate a copy of this template elsewhere, install
[bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap phoenix
```
'';
inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a working environment for Python (version
(version 1.7.0). [direnv](https://direnv.net/) can be used to a launch a dev
shell upon entering this directory (refer to `.envrc`). Otherwise run via:
```bash
$> nix develop
$ nix develop
```
## Language Server
@ -23,7 +23,7 @@ Formatting depends on the [black](https://black.readthedocs.io/en/stable/index.h
(version 23.9.1) tool. A `pre-commit` hook is included in `.githooks` that can
be used to format all `*.py` files prior to commit. Install via:
```bash
$> git config --local core.hooksPath .githooks/
$ git config --local core.hooksPath .githooks/
```
If running [direnv](https://direnv.net/), this hook is installed automatically
when entering the directory.

View File

@ -5,8 +5,11 @@
This flake has been adapted from the `app` template found in:
https://github.com/nix-community/poetry2nix
To generate a copy of this template elsewhere, run:
$> bootstrap poetry
To generate a copy of this template elsewhere, install
[bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap poetry
```
'';
inputs = {

View File

@ -5,7 +5,7 @@ This is a template for constructing a working environment for local
can be used to a launch a dev shell upon entering this directory (refer to
`.envrc`). Otherwise run via:
```bash
$> nix develop
$ nix develop
```
## Quickstart
@ -13,15 +13,15 @@ $> nix develop
An empty Postgres cluster is initialized at `/db`. To start the database, run
the following:
```bash
$> pg_ctl -D db -l db/logfile -o --unix_socket_directories=@postgres start
$ pg_ctl -D db -l db/logfile -o --unix_socket_directories=@postgres start
```
In the above command, `@postgres` refers to an [abstract socket name](https://www.postgresql.org/docs/15/runtime-config-connection.html#GUC-UNIX-SOCKET-DIRECTORIES).
Rename to whatever is appropriate for your use case. To then connect to this
database instance, run:
```bash
$> psql -h @postgres
$ psql -h @postgres
```
To later shut the database down, run:
```bash
$> pg_ctl -D db stop
$ pg_ctl -D db stop
```

View File

@ -2,8 +2,11 @@
description = ''
An opinionated postgres flake.
To generate a copy of this template elsewhere, run:
$> bootstrap postgres
To generate a copy of this template elsewhere, install
[bootstrap](https://github.com/jrpotter/bootstrap) and run:
```bash
$ bootstrap postgres
```
'';
inputs = {