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

Correcting misspelled words #1349

Merged
merged 3 commits into from
May 10, 2021
Merged
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: 1 addition & 1 deletion cobra/cmd/init_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ func TestGoldenInitCmd(t *testing.T) {
expectErr: true,
},
{
name: "returns error when passing an relative path for project",
name: "returns error when passing a relative path for project",
args: []string{"github.com/spf13/testproject"},
pkgName: "github.com/spf13/testproject",
expectErr: true,
Expand Down
2 changes: 1 addition & 1 deletion completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func (c *Command) getCompletions(args []string) (*Command, []string, ShellCompDi
if len(finalArgs) == 0 && !foundLocalNonPersistentFlag {
// We only complete sub-commands if:
// - there are no arguments on the command-line and
// - there are no local, non-peristent flag on the command-line or TraverseChildren is true
// - there are no local, non-persistent flags on the command-line or TraverseChildren is true
for _, subCmd := range finalCmd.Commands() {
if subCmd.IsAvailableCommand() || subCmd == finalCmd.helpCommand {
if strings.HasPrefix(subCmd.Name(), toComplete) {
Expand Down
4 changes: 2 additions & 2 deletions powershell_completions.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {
# filter the result
$_.Name -like "$WordToComplete*"

# Join the flag back if we have a equal sign flag
# Join the flag back if we have an equal sign flag
if ( $IsEqualFlag ) {
__%[1]s_debug "Join the equal sign flag back to the completion value"
$_.Name = $Flag + "=" + $_.Name
Expand All @@ -178,7 +178,7 @@ Register-ArgumentCompleter -CommandName '%[1]s' -ScriptBlock {

$Values | ForEach-Object {

# store temporay because switch will overwrite $_
# store temporary because switch will overwrite $_
$comp = $_

# PowerShell supports three different completion modes
Expand Down