We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a03055d commit 17dde5aCopy full SHA for 17dde5a
cmd/embedded-cluster/shell.go
@@ -85,6 +85,13 @@ var shellCommand = &cli.Command{
85
config = "source <(kubectl completion $(basename ${SHELL}))\n"
86
_, _ = shellpty.WriteString(config)
87
_, _ = io.CopyN(io.Discard, shellpty, int64(len(config)+1))
88
+ // if /etc/bash_completion is present, source it
89
+ if _, err := os.Stat("/etc/bash_completion"); err == nil {
90
+ config = "source /etc/bash_completion\n"
91
+ _, _ = shellpty.WriteString(config)
92
+ _, _ = io.CopyN(io.Discard, shellpty, int64(len(config)+1))
93
+ }
94
+
95
go func() { _, _ = io.Copy(shellpty, os.Stdin) }()
96
go func() { _, _ = io.Copy(os.Stdout, shellpty) }()
97
_ = shell.Wait()
0 commit comments