Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# unreleased


## Features
- Add build for windows/ARM64 platform. #3190 (@alcroito)

Expand Down Expand Up @@ -35,6 +36,7 @@
- Update console dependency to 0.16, see #3351 (@musicinmybrain)
- Fixed some typos #3244 (@ssbarnea)
- Update onig_sys dependency to 69.9.1 to fix a gcc build failure #3400 (@CosmicHorrorDev)
- Update documentation to add bash autocompletion for help #3423 (@euge908)

## Syntaxes

Expand Down
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,7 @@ You can use `bat` to colorize help text: `$ cp --help | bat -plhelp`

You can also use a wrapper around this:


```bash
# in your .bashrc/.zshrc/*rc
alias bathelp='bat --plain --language=help'
Expand All @@ -241,6 +242,16 @@ help() {

Then you can do `$ help cp` or `$ help git commit`.


Bashcompletion might not work properly with the above command, because `help` is aliased as a function. To resolve this, you can also put the following in your `.bashrc`:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can the problematic snippet be fixed so no workaround is needed? I don't fully understand why the original snippet has a problem though. What are the steps to reproduce?


```
# in your .bashrc/.zshrc/*rc
complete -F _command help

# Ex: try `help gi<TAB>`
```

When you are using `zsh`, you can also use global aliases to override `-h` and `--help` entirely:

```bash
Expand Down
Loading