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

Add support for fish completion #1201

Merged
merged 2 commits into from Sep 20, 2020
Merged

Add support for fish completion #1201

merged 2 commits into from Sep 20, 2020

Conversation

sayboras
Copy link
Member

@sayboras sayboras commented Jun 30, 2020

Add completion support for fish shell

image

@sayboras sayboras marked this pull request as draft June 30, 2020 02:49
Copy link
Member

@bombsimon bombsimon left a comment

Choose a reason for hiding this comment

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

LGTM!

go.mod Outdated Show resolved Hide resolved
Copy link
Contributor

@iwankgb iwankgb left a comment

Choose a reason for hiding this comment

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

Mention golangci/team when your Cobra PR is merged.

go.mod Outdated Show resolved Hide resolved
@sayboras sayboras marked this pull request as ready for review July 10, 2020 23:32
@SVilgelm SVilgelm added the enhancement New feature or improvement label Jul 12, 2020
@sayboras sayboras changed the title Add support for fish completion WIP Add support for fish completion Jul 12, 2020
@sayboras sayboras force-pushed the feature/fish-completion branch 2 times, most recently from 5b27d33 to 59232e6 Compare July 12, 2020 22:50
@sayboras sayboras changed the title WIP Add support for fish completion Add support for fish completion Sep 3, 2020
@sayboras
Copy link
Member Author

@golangci/team seems like cobra might take time to release tagged version, just wanna check if you guys are ok with git hash version from master. If yes, I can merge this in, otherwise, will mark this as draft.

@sayboras sayboras requested a review from a team September 20, 2020 04:26
Co-authored-by: Sascha Grunert <sgrunert@suse.com>
@sayboras sayboras merged commit 5f93c93 into master Sep 20, 2020
@delete-merged-branch delete-merged-branch bot deleted the feature/fish-completion branch September 20, 2020 21:50
sayboras added a commit to sayboras/golangci-lint that referenced this pull request Oct 18, 2020
This commit is to use tag version for cobra (e.g. 1.1.1). The main
benefit is that this can be managed and upgraded by dependabot later.

This is follow-up item from PR golangci#1201.

Signed-off-by: Tam Mach <sayboras@yahoo.com>
sayboras added a commit that referenced this pull request Oct 19, 2020
This commit is to use tag version for cobra (e.g. 1.1.1). The main
benefit is that this can be managed and upgraded by dependabot later.

This is follow-up item from PR #1201.

Signed-off-by: Tam Mach <sayboras@yahoo.com>
@Alwayswithme
Copy link

Alwayswithme commented Dec 6, 2020

@sayboras hi, I generate completion script at this directory by golangci-lint completion fish > ~/.config/fish/completions/

but encouter issue when golangci-lint run <hit tab>, can u teach me how to setup completion for fish?

➜  completions golangci-lint run math: Error: Unexpected token
'ompletion ended with directive: ShellCompDirectiveDefault / 1'
         ^
math: Error: Unexpected token
'% 2'
 ^
test: Missing argument at index 2

~/.config/fish/completions/golangci-lint.fish (line 99): 
    if test $compErr -eq 1
       ^
in function '__golangci_lint_prepare_completions'
in command substitution

(Type 'help test' for related documentation)
math: Error: Unexpected token
'ompletion ended with directive: ShellCompDirectiveDefault / 8'
         ^
math: Error: Unexpected token
'% 2'
 ^

golangci-lint has version 1.33.0 built from b90551c on 2020-11-23T06:54:06Z
fish, version 3.1.2

@sayboras
Copy link
Member Author

sayboras commented Dec 7, 2020

have you try with ~/.config/fish/completions/golangci-lint.fish ?

tam.mach@24430 ~/g/s/g> golangci-lint
cache  (Cache control and information)  help                                                                                                (Help)  version  (Version)
completion  (Output completion script)  linters                                                               (List current linters configuration)
config                        (Config)  run  (Run this tool in cloud on every github pull request in https://golangci.com for free (public repos))

tam.mach@24430 ~/g/s/g> golangci-lint version
golangci-lint has version 1.33.0 built from b90551c on 2020-11-23T06:54:06Z

@ldez ldez added this to the v1.32 milestone Mar 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or improvement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants