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

docs: hardhat-completion add windows troubleshooting #5749

Merged
merged 4 commits into from
Nov 22, 2024
Merged
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
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,17 @@ If you are using bash, try this:
- Run `complete -p hh`. You should get `complete -o default -F _hh_completion hh` as the output.
- Check that your `.bashrc` has a line that loads a `__tabtab.bash` file. This is the file that in turn should load the `hh` completion.
- Check that this `__tabtab.bash` exists, and that there is a `hh.bash` file in that same directory.

### Windows user

`hardhat-shorthand` doesn't work well by default on Windows. Please read this to learn why and how to improve it.

On Windows, the default `hh` command is associated with the HTML Help executable program (hh.exe). To use `hardhat-shorthand`, you can simply run `npx hh` instead of `hh`, but that won't work well with its autocompletion.

If you want to use `hh` on Windows, you can follow these steps:

1. Run `npm config get prefix` to get the npm global packages installation location.

2. Add the npm location to the `Path` environment variable.

3. Make sure to add the npm location to `Path` before `%SystemRoot%` because default `hh.exe` is in `%SystemRoot%`, and it will take precedence over `hh-shorthand` otherwise.