-
Notifications
You must be signed in to change notification settings - Fork 389
Completion command
Stripe CLI supports autocompletion for macOS and Linux to make it easier for you to use the right commands with th e CLI.
You set started by setting up autocompletion by running stripe completion
and depending on your platform and shell the relevant instructions are show to you.
Running stripe completion
will generate a stripe-completion.zsh
file, which you'll need to either source this file or move it to zsh's autocomplete folder.
To source, run: source stripe-completion.zsh
.
To load automatically, move to zsh's autocomplete directory: mv stripe-completion.zsh %s
Running stripe completion
will generate a stripe-completion.bash
file, which you'll need to either source this file or move it to Bash's autocomplete folder.
To source, run: source stripe-completion.bash
.
To load automatically, move to bash's autocomplete directory: mv stripe-completion.bash %s
t
if cc.shell == "zsh" {
return rootCmd.GenZshCompletionFile("stripe-completion.zsh")
fileName := "stripe-completion.zsh"
fmt.Println(fmt.Sprintf("Generating zsh completion file in: %s", ansi.Bold(fileName)))
fmt.Println("")
fmt.Println(fmt.Sprintf("To source, run: `source %s`", fileName))
fmt.Println(fmt.Sprintf("To load automatically, move to zsh's autocomplete directory: `mv %s %s`", fileName, installDirectory[userOS]["zsh"]))
return rootCmd.GenZshCompletionFile(fileName)
}
return rootCmd.GenBashCompletionFile("stripe-completion.bash")
fileName := "stripe-completion.bash"
fmt.Println(fmt.Sprintf("Generating bash completion file in: %s", ansi.Bold(fileName)))
fmt.Println("You'll need to either source this file or move it to bash's autocomplete folder.")
fmt.Println(fmt.Sprintf("To source, run: `source %s`", fileName))
fmt.Println(fmt.Sprintf("To load automatically, move to bash's autocomplete directory: `mv %s %s`", fileName, installDirectory[userOS]["bash"]))
return rootCmd.GenBashCompletionFile(fileName)
Windows is currently not supported.