Added pwdx completer

This commit is contained in:
Saurabh Kushwah 2025-04-18 23:47:06 +05:30
parent 3110e94f3c
commit 8371a71c72
No known key found for this signature in database
GPG Key ID: 8E11E1DCD6CCE8D5
2 changed files with 36 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/ps"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "pwdx",
Short: "report current working directory of a process",
Long: "https://man7.org/linux/man-pages/man1/pwdx.1.html",
Run: func(cmd *cobra.Command, args []string) {},
}
func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()
rootCmd.Flags().BoolP("help", "h", false, "display this help and exit")
rootCmd.Flags().BoolP("version", "V", false, "output version information and exit")
carapace.Gen(rootCmd).PositionalAnyCompletion(
ps.ActionProcessIds(),
)
}

View File

@ -0,0 +1,7 @@
package main
import "github.com/carapace-sh/carapace-bin/completers/pwdx_completer/cmd"
func main() {
cmd.Execute()
}