mirror of
https://github.com/rsteube/carapace-bin.git
synced 2025-05-05 15:32:53 +00:00
pacman: simply complete files to query file database
This commit is contained in:
parent
5a8e7fe144
commit
d148d9a504
@ -15,6 +15,8 @@ var databaseCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(databaseCmd).Standalone()
|
||||
|
||||
databaseCmd.Flags().String("arch", "", "set an alternate architecture")
|
||||
databaseCmd.Flags().Bool("asdeps", false, "mark packages as non-explicitly installed")
|
||||
databaseCmd.Flags().Bool("asexplicit", false, "mark packages as explicitly installed")
|
||||
|
@ -15,6 +15,8 @@ var deptestCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(deptestCmd).Standalone()
|
||||
|
||||
deptestCmd.Flags().String("arch", "", "set an alternate architecture")
|
||||
deptestCmd.Flags().String("cachedir", "", "set an alternate package cache location")
|
||||
deptestCmd.Flags().String("color", "", "colorize the output")
|
||||
|
@ -2,7 +2,6 @@ package cmd
|
||||
|
||||
import (
|
||||
"github.com/carapace-sh/carapace"
|
||||
"github.com/carapace-sh/carapace-bin/pkg/actions/tools/pacman"
|
||||
"github.com/carapace-sh/carapace/pkg/style"
|
||||
"github.com/spf13/cobra"
|
||||
)
|
||||
@ -15,6 +14,8 @@ var filesCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(filesCmd).Standalone()
|
||||
|
||||
filesCmd.Flags().String("arch", "", "set an alternate architecture")
|
||||
filesCmd.Flags().String("cachedir", "", "set an alternate package cache location")
|
||||
filesCmd.Flags().String("color", "", "colorize the output")
|
||||
@ -49,6 +50,6 @@ func init() {
|
||||
})
|
||||
|
||||
carapace.Gen(filesCmd).PositionalAnyCompletion(
|
||||
pacman.ActionPackages().FilterArgs(),
|
||||
carapace.ActionFiles().Chdir("/"),
|
||||
)
|
||||
}
|
||||
|
@ -15,6 +15,8 @@ var queryCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(queryCmd).Standalone()
|
||||
|
||||
queryCmd.Flags().String("arch", "", "set an alternate architecture")
|
||||
queryCmd.Flags().String("cachedir", "", "set an alternate package cache location")
|
||||
queryCmd.Flags().BoolP("changelog", "c", false, "view the changelog of a package")
|
||||
|
@ -15,6 +15,8 @@ var removeCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(removeCmd).Standalone()
|
||||
|
||||
removeCmd.Flags().String("arch", "", "set an alternate architecture")
|
||||
removeCmd.Flags().String("assume-installed", "", "add a virtual package to satisfy dependencies")
|
||||
removeCmd.Flags().String("cachedir", "", "set an alternate package cache location")
|
||||
|
@ -15,6 +15,8 @@ var syncCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(syncCmd).Standalone()
|
||||
|
||||
syncCmd.Flags().String("arch", "", "set an alternate architecture")
|
||||
syncCmd.Flags().Bool("asdeps", false, "install packages as non-explicitly installed")
|
||||
syncCmd.Flags().Bool("asexplicit", false, "install packages as explicitly installed")
|
||||
|
@ -15,6 +15,8 @@ var upgradeCmd = &cobra.Command{
|
||||
}
|
||||
|
||||
func init() {
|
||||
carapace.Gen(upgradeCmd).Standalone()
|
||||
|
||||
upgradeCmd.Flags().String("arch", "", "set an alternate architecture")
|
||||
upgradeCmd.Flags().Bool("asdeps", false, "install packages as non-explicitly installed")
|
||||
upgradeCmd.Flags().Bool("asexplicit", false, "install packages as explicitly installed")
|
||||
|
Loading…
x
Reference in New Issue
Block a user