Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

artisan: complete, horizonpurge, serve #2461

Merged
merged 1 commit into from
Jul 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions completers/artisan_completer/cmd/complete.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,8 @@ func init() {
completeCmd.Flags().String("shell", "", "The shell type (\"bash\", \"fish\", \"zsh\")")
completeCmd.Flags().String("symfony", "", "deprecated")
rootCmd.AddCommand(completeCmd)

carapace.Gen(completeCmd).FlagCompletion(carapace.ActionMap{
"shell": carapace.ActionValues("bash", "fish", "zsh"),
})
}
5 changes: 5 additions & 0 deletions completers/artisan_completer/cmd/horizonPurge.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/ps"
"github.com/spf13/cobra"
)

Expand All @@ -16,4 +17,8 @@ func init() {

horizonPurgeCmd.Flags().String("signal", "", "The signal to send to the rogue processes")
rootCmd.AddCommand(horizonPurgeCmd)

carapace.Gen(horizonPurgeCmd).FlagCompletion(carapace.ActionMap{
"signal": ps.ActionKillSignals(),
})
}
6 changes: 6 additions & 0 deletions completers/artisan_completer/cmd/serve.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/net"
"github.com/spf13/cobra"
)

Expand All @@ -19,4 +20,9 @@ func init() {
serveCmd.Flags().String("port", "", "The port to serve the application on")
serveCmd.Flags().String("tries", "", "The max number of ports to attempt to serve from")
rootCmd.AddCommand(serveCmd)

carapace.Gen(serveCmd).FlagCompletion(carapace.ActionMap{
"host": carapace.ActionValues("localhost", "127.0.0.1"),
"port": net.ActionPorts(),
})
}