8000 - · symfony-cli/symfony-cli@58824ce · GitHub
[go: up one dir, main page]

Skip to content

Commit 58824ce

Browse files
committed
-
1 parent 2502c34 commit 58824ce

File tree

3 files changed

+5
-9
lines changed

3 files changed

+5
-9
lines changed

commands/completion_posix.go

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import (
77
"fmt"
88
"io"
99
"os"
10-
"path"
1110
"strconv"
1211
"strings"
1312

@@ -30,7 +29,7 @@ func init() {
3029
func autocompleteSymfonyConsoleWrapper(context *console.Context, words complete.Args) []string {
3130
args := buildSymfonyAutocompleteArgs("console", words)
3231
// Composer does not support those options yet, so we only use them for Symfony Console
33-
args = append(args, "-a1", fmt.Sprintf("-s%s", guessShell()))
32+
args = append(args, "-a1", fmt.Sprintf("-s%s", console.GuessShell()))
3433

3534
os.Exit(php.SymonyConsoleExecutor(args).Execute(false))
3635

@@ -81,8 +80,3 @@ func buildSymfonyAutocompleteArgs(wrappedCommand string, words complete.Args) []
8180
fmt.Sprintf("-i%s", wrappedCommand),
8281
}, args...)
8382
}
84-
85-
// TODO: replace by console.GuessShell() when it's exposed
86-
func guessShell() string {
87-
return path.Base(os.Getenv("SHELL"))
88-
}

go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ require (
1717
github.com/nxadm/tail v1.4.11
1818
github.com/olekukonko/tablewriter v0.0.5
1919
github.com/pkg/errors v0.9.1
20+
github.com/posener/complete v1.2.3
2021
github.com/rjeczalik/notify v0.9.3
2122
github.com/rs/xid v1.5.0
2223
github.com/rs/zerolog v1.33.0
@@ -25,7 +26,7 @@ require (
2526
github.com/soheilhy/cmux v0.1.5
2627
github.com/stoicperlman/fls v0.0.0-20171222144224-f073b7a01081
2728
github.com/symfony-cli/cert v1.0.6
28-
github.com/symfony-cli/console v1.1.3
29+
github.com/symfony-cli/console v1.1.4
2930
github.com/symfony-cli/phpstore v1.0.12
3031
github.com/symfony-cli/terminal v1.0.7
3132
golang.org/x/sync v0.7.0
@@ -65,7 +66,6 @@ require (
6566
github.com/opencontainers/go-digest v1.0.0 // indirect
6667
github.com/opencontainers/image-spec v1.1.0 // indirect
6768
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
68-
github.com/posener/complete v1.2.3 // indirect
6969
github.com/rivo/uniseg v0.4.7 // indirect
7070
github.com/rogpeppe/go-internal v1.12.0 // indirect
7171
github.com/sirupsen/logrus v1.9.3 // indirect

go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,8 @@ github.com/symfony-cli/console v1.1.2 h1:YVQbl4i03cE0r3QJ/RJs7LWaC3pEy2JI4qhFfL6
156156
github.com/symfony-cli/console v1.1.2/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8=
157157
github.com/symfony-cli/console v1.1.3 h1:ejzr9LdNe7d7FLIpeTyZm89nSgnlPhaqK7IPeyglV9o=
158158
github.com/symfony-cli/console v1.1.3/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8=
159+
github.com/symfony-cli/console v1.1.4 h1:A/rzNY8HiZd4r6ip2H2HCtnxwYFdC87eYnPL9H/RucM=
160+
github.com/symfony-cli/console v1.1.4/go.mod h1:AB4ZxA593cyS/1NhwnDEUChIPaGuddFqooipam1vyS8=
159161
github.com/symfony-cli/phpstore v1.0.12 h1:2mKJrDielSCW+7B+63w6HebmSBcB4qV7uuvNrIjLkoA=
160162
github.com/symfony-cli/phpstore v1.0.12/go.mod h1:U29bdJBPs9p28PzLIRKfKfKkaiH0kacdyufl3eSB1d4=
161163
github.com/symfony-cli/terminal v1.0.7 h1:57L9PUTE2cHfQtP8Ti8dyiiPEYlQ1NBIDpMJ3RPEGPc=

0 commit comments

Comments
 (0)
0