Skip to content

Commit f7b7cda

Browse files
authored
docs: move configuration section above completions (#408)
1 parent 6d3ad10 commit f7b7cda

File tree

3 files changed

+65
-63
lines changed

3 files changed

+65
-63
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
66

77
#### [Unreleased](https://github.com/hougesen/mdsf/compare/v0.2.1...HEAD)
88

9+
- docs: move configuration section above completions [`#408`](https://github.com/hougesen/mdsf/pull/408)
10+
- build(deps): bump clap_complete to 4.5.8 [`#407`](https://github.com/hougesen/mdsf/pull/407)
911
- build(deps): bump test-with to 0.13.0 [`#406`](https://github.com/hougesen/mdsf/pull/406)
1012
- docs: changelog for ureleased prs [`#405`](https://github.com/hougesen/mdsf/pull/405)
1113
- build(deps): bump clap to 4.5.9 [`#404`](https://github.com/hougesen/mdsf/pull/404)

README.md

Lines changed: 61 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -106,67 +106,6 @@ Options:
106106

107107
<!-- END_SECTION:verify-command-help -->
108108

109-
### Shell completions
110-
111-
Shell completions can be generated using `mdsf completions <SHELL>`.
112-
113-
<!-- START_SECTION:completions-command-help -->
114-
115-
```
116-
Generate shell completion
117-
118-
Usage: mdsf completions <SHELL>
119-
120-
Arguments:
121-
<SHELL> [possible values: bash, elvish, fish, powershell, zsh]
122-
123-
Options:
124-
-h, --help Print help
125-
-V, --version Print version
126-
```
127-
128-
<!-- END_SECTION:completions-command-help -->
129-
130-
#### Bash
131-
132-
Add the following to your `.bashrc`.
133-
134-
```bash
135-
eval "$(mdsf completions bash)"
136-
```
137-
138-
#### Bash
139-
140-
Add the following to your `.zshrc`.
141-
142-
```bash
143-
eval "$(mdsf completions zsh)"
144-
```
145-
146-
#### Fish
147-
148-
Add the following to `~/.config/fish/config.fish`.
149-
150-
```fish
151-
mdsf completions fish | source
152-
```
153-
154-
#### PowerShell
155-
156-
Add the following to your PowerShell configuration (Can be found by running `$PROFILE`).
157-
158-
```powershell
159-
Invoke-Expression (&mdsf completions powershell)
160-
```
161-
162-
#### Elvish
163-
164-
Add the following to `~/.elvish/rc.elv`.
165-
166-
```elvish
167-
eval (mdsf completions elvish)
168-
```
169-
170109
## Configuration
171110

172111
The default configuration of `mdsf` aims to as sane as possible. For that reason the default formatter for each language is the one most people have installed.
@@ -379,6 +318,67 @@ mdsf init
379318

380319
<!-- END_SECTION:supported-tools -->
381320

321+
## Shell completions
322+
323+
Shell completions can be generated using `mdsf completions <SHELL>`.
324+
325+
<!-- START_SECTION:completions-command-help -->
326+
327+
```
328+
Generate shell completion
329+
330+
Usage: mdsf completions <SHELL>
331+
332+
Arguments:
333+
<SHELL> [possible values: bash, elvish, fish, powershell, zsh]
334+
335+
Options:
336+
-h, --help Print help
337+
-V, --version Print version
338+
```
339+
340+
<!-- END_SECTION:completions-command-help -->
341+
342+
#### Bash
343+
344+
Add the following to your `.bashrc`.
345+
346+
```bash
347+
eval "$(mdsf completions bash)"
348+
```
349+
350+
#### Bash
351+
352+
Add the following to your `.zshrc`.
353+
354+
```bash
355+
eval "$(mdsf completions zsh)"
356+
```
357+
358+
#### Fish
359+
360+
Add the following to `~/.config/fish/config.fish`.
361+
362+
```fish
363+
mdsf completions fish | source
364+
```
365+
366+
#### PowerShell
367+
368+
Add the following to your PowerShell configuration (Can be found by running `$PROFILE`).
369+
370+
```powershell
371+
Invoke-Expression (&mdsf completions powershell)
372+
```
373+
374+
#### Elvish
375+
376+
Add the following to `~/.elvish/rc.elv`.
377+
378+
```elvish
379+
eval (mdsf completions elvish)
380+
```
381+
382382
## Acknowledgement
383383

384384
mdsf was inspired by the amazing neovim formatting plugin [conform.nvim](https://github.com/stevearc/conform.nvim).

src/caching.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ mod test_get_config_hash {
2929
use crate::{caching::get_config_hash, config::MdsfConfig};
3030

3131
#[test]
32-
fn it_shoud_be_deterministic() {
32+
fn it_should_be_deterministic() {
3333
assert_eq!(
3434
get_config_hash(&MdsfConfig::default()),
3535
get_config_hash(&MdsfConfig::default()),
@@ -51,7 +51,7 @@ mod test_hash_text_block {
5151
use crate::caching::hash_text_block;
5252

5353
#[test]
54-
fn it_shoud_be_deterministic() {
54+
fn it_should_be_deterministic() {
5555
assert_eq!(
5656
hash_text_block("mads was here"),
5757
hash_text_block("mads was here"),

0 commit comments

Comments
 (0)