Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix /docs/witness_completion.md formatting #291

Open
BHunter2889 opened this issue Oct 27, 2023 · 1 comment
Open

Fix /docs/witness_completion.md formatting #291

BHunter2889 opened this issue Oct 27, 2023 · 1 comment

Comments

@BHunter2889
Copy link

BHunter2889 commented Oct 27, 2023

Lines ~7-31 of the witness_completion.md doc seem to be incorrectly formatted per GFM:
https://github.com/testifysec/witness/blob/602dc485b2b775e6c7cc66b11653a91fdef2aeda/docs/witness_completion.md?plain=1#L7-L31

Screenshot of rendered Preview:
image

There are a few ways to take care of this but this is perhaps the simplest for what was intended:

To load completions:

Bash:
```
  $ source <(witness completion bash)
  # To load completions for each session, execute once:   
  # Linux:
  $ witness completion bash > /etc/bash_completion.d/witness
  # macOS:
  $ witness completion bash > /usr/local/etc/bash_completion.d/witness
```
Zsh:
```
  # If shell completion is not already enabled in your environment,
  # you will need to enable it.  You can execute the following once:
  $ echo "autoload -U compinit; compinit" >> ~/.zshrc
  # To load completions for each session, execute once:
  $ witness completion zsh > "${fpath[1]}/_witness"
  # You will need to start a new shell for this setup to take effect.
```
fish:
```
  $ witness completion fish | source
  # To load completions for each session, execute once:
  $ witness completion fish > ~/.config/fish/completions/witness.fish
```
PowerShell:
```
  PS> witness completion powershell | Out-String | Invoke-Expression
  # To load completions for every new session, run:
  PS> witness completion powershell > witness.ps1
  # and source this file from your PowerShell profile.
```

Which renders this:
image

I would put up a PR after raising this, but I'm not sure this constitutes a "meaningful body of work" haha.

@ChaosInTheCRD
Copy link
Collaborator

Hi there 👋

@BHunter2889 Thanks for pointing this out! We are planning on doing a rehaul on our documentation in the coming weeks / months, but you pointing this out certainly is most helpful!

If you would like to submit a PR for this you are most welcome to and I will review/approve/merge 😄. If you would prefer otherwise I can go ahead and submit this myself, it's really up to you.

If there's anything big or small you notice in the future, any issue you file and suggestion you make is much appreciated.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants