Skip to content

Commit

Permalink
docs: hardhat-completion add windows troubleshooting
Browse files Browse the repository at this point in the history
  • Loading branch information
iosh committed Sep 14, 2024
1 parent d725c09 commit 0fcff9d
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,12 @@ 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

- The `hardhat-completion install` is not supported on Windows.
- On Windows, the default `hh` command is associated with the HTML Help executable program (Hh.exe). To use `hardhat-completion`, you can simply run `npx hh` instead of `hh`.
- If you want to set the `hh`command for hardhat-completion as the default on Windows, you can follow these steps:
1. Run the `npm config get prefix` to get the npm global packages installation location.
2. Add the npm location to the `Path` environment variable. For more information, refer to the [Microsoft document](https://learn.microsoft.com/en-us/previous-versions/office/developer/sharepoint-2010/ee537574(v=office.14))
3. You need to set the system environment variable `Path` because the `Hh.exe` is in `%SystemRoot%` environment variable. Add the npm location to the `Path` before `%SystemRoot%`

0 comments on commit 0fcff9d

Please sign in to comment.