Skip to content

Commit 7c74490

Browse files
authored
Merge pull request #19 from tucksaun/feat/export-guess-shell
Export GuessShell
2 parents 051a25c + 182240f commit 7c74490

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

completion_installer.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ Add this to the end of your shell configuration file (e.g. <info>"{{ call .RcFil
7070
CompletionFile func() string
7171
}{
7272
Command: command,
73-
Shell: guessShell,
73+
Shell: GuessShell,
7474
RcFile: func() string {
75-
switch guessShell() {
75+
switch GuessShell() {
7676
case "fish":
7777
return "~/.config/fish/config.fish"
7878
case "zsh":
@@ -82,7 +82,7 @@ Add this to the end of your shell configuration file (e.g. <info>"{{ call .RcFil
8282
}
8383
},
8484
CompletionFile: func() string {
85-
switch guessShell() {
85+
switch GuessShell() {
8686
case "fish":
8787
return fmt.Sprintf("/etc/fish/completions/%s.fish", application.HelpName)
8888
case "zsh":
@@ -107,7 +107,7 @@ Add this to the end of your shell configuration file (e.g. <info>"{{ call .RcFil
107107
Action: func(c *Context) error {
108108
shell := c.Args().Get("shell")
109109
if shell == "" {
110-
shell = guessShell()
110+
shell = GuessShell()
111111
}
112112

113113
templates, err := template.ParseFS(CompletionTemplates, "resources/*")
@@ -136,6 +136,6 @@ Add this to the end of your shell configuration file (e.g. <info>"{{ call .RcFil
136136
},
137137
}
138138

139-
func guessShell() string {
139+
func GuessShell() string {
140140
return path.Base(os.Getenv("SHELL"))
141141
}

0 commit comments

Comments
 (0)