Documentation
¶
Overview ¶
Package cli provides the interface for the command-line.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AutocompleteCommand = &cobra.Command{ Use: i18n.G("autocomplete [bash|zsh|fish|powershell]"), Aliases: strings.Split(autocompleteAliases, ","), Short: i18n.G("Generate autocompletion script"), Long: i18n.G(`To load completions: Bash: # Load autocompletion for the current Bash session $ source <(abra autocomplete bash) # To load autocompletion for each session, execute once: # Linux: $ abra autocomplete bash | sudo tee /etc/bash_completion.d/abra # macOS: $ abra autocomplete bash | sudo tee $(brew --prefix)/etc/bash_completion.d/abra Zsh: # If shell autocompletion is not already enabled in your environment, # you will need to enable it. You can execute the following once: $ echo "autoload -U compinit; compinit" >> ~/.zshrc # To load autocompletions for each session, execute once: $ abra autocomplete zsh > "${fpath[1]}/_abra" # You will need to start a new shell for this setup to take effect. fish: $ abra autocomplete fish | source # To load autocompletions for each session, execute once: $ abra autocomplete fish > ~/.config/fish/completions/abra.fish PowerShell: PS> abra autocomplete powershell | Out-String | Invoke-Expression # To load autocompletions for every new session, run: PS> abra autocomplete powershell > abra.ps1 # and source this file from your PowerShell profile.`), DisableFlagsInUseLine: true, ValidArgs: []string{"bash", "zsh", "fish", "powershell"}, Args: cobra.MatchAll(cobra.ExactArgs(1), cobra.OnlyValidArgs), Run: func(cmd *cobra.Command, args []string) { switch args[0] { case "bash": cmd.Root().GenBashCompletion(os.Stdout) case "zsh": cmd.Root().GenZshCompletion(os.Stdout) case "fish": cmd.Root().GenFishCompletion(os.Stdout, true) case "powershell": cmd.Root().GenPowerShellCompletionWithDesc(os.Stdout) } }, }
View Source
var UpgradeCommand = &cobra.Command{ Use: i18n.G("upgrade [flags]"), Aliases: strings.Split(upgradeAliases, ","), Short: i18n.G("Upgrade abra"), Long: i18n.G(`Upgrade abra in-place with the latest stable or release candidate. By default, the latest stable release is downloaded. Use "--rc/-r" to install the latest release candidate. Please bear in mind that it may contain absolutely catastrophic deal-breaker bugs. Thank you very much for the testing efforts 💗`), Example: i18n.G(" abra upgrade --rc"), Args: cobra.NoArgs, Run: func(cmd *cobra.Command, args []string) { mainURL := "https://install.abra.coopcloud.tech" c := exec.Command("bash", "-c", fmt.Sprintf("wget -q -O- %s | bash", mainURL)) if releaseCandidate { releaseCandidateURL := "https://git.coopcloud.tech/coop-cloud/abra/raw/branch/main/scripts/installer/installer" c = exec.Command("bash", "-c", fmt.Sprintf("wget -q -O- %s | bash -s -- --rc", releaseCandidateURL)) } log.Debugf(i18n.G("attempting to run %s", c)) if err := internal.RunCmd(c); err != nil { log.Fatal(err) } }, }
UpgradeCommand upgrades abra in-place.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.