Skip to content

Commit 7c81464

Browse files
alexandearldez
andauthored
docs: update completion guide (golangci#5239)
Co-authored-by: Fernandez Ludovic <[email protected]>
1 parent f5cca90 commit 7c81464

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

docs/src/docs/welcome/integrations.mdx

+11-5
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,17 @@ The following plugins support `golangci-lint`:
5252

5353
`golangci-lint` can generate Bash, fish, PowerShell, and Zsh completion files.
5454

55-
### macOS
55+
See the instructions on `golangci-lint completion <YOUR_SHELL> --help` (replace `<YOUR_SHELL>` with your favorite one).
56+
57+
<details><summary>Bash & macOS</summary>
58+
59+
There are two versions of `bash-completion`, v1 and v2. V1 is for Bash 3.2 (which is the default on macOS), and v2 is for Bash 4.1+.
60+
61+
The `golangci-lint` completion script doesn’t work correctly with bash-completion v1 and Bash 3.2. It requires bash-completion v2 and Bash 4.1+.
5662

57-
There are two versions of `bash-completion`, v1 and v2. V1 is for Bash 3.2 (which is the default on macOS), and v2 is for Bash 4.1+. The `golangci-lint` completion script doesn’t work correctly with bash-completion v1 and Bash 3.2. It requires bash-completion v2 and Bash 4.1+. Thus, to be able to correctly use `golangci-lint` completion on macOS, you have to install and use Bash 4.1+ ([instructions](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba)). The following instructions assume that you use Bash 4.1+ (that is, any Bash version of 4.1 or newer).
63+
Thus, to be able to correctly use `golangci-lint` completion on macOS, you have to install and use Bash 4.1+ ([instructions](https://itnext.io/upgrading-bash-on-macos-7138bd1066ba)).
64+
65+
The following instructions assume that you use Bash 4.1+ (that is, any Bash version of 4.1 or newer).
5866

5967
Install `bash-completion v2`:
6068

@@ -73,9 +81,7 @@ echo 'source <(golangci-lint completion bash)' >>~/.bashrc
7381
source ~/.bashrc
7482
```
7583

76-
### Linux
77-
78-
See the instructions on `golangci-lint completion <YOUR_SHELL> --help` (replace `<YOUR_SHELL>` with your favorite one).
84+
</details>
7985

8086
## CI Integration
8187

0 commit comments

Comments
 (0)