w: updated to procps-ng 4.0.5

This commit is contained in:
Saurabh Kushwah 2025-04-19 14:41:30 +05:30
parent 8cf0b570ea
commit 81262bdc63
No known key found for this signature in database
GPG Key ID: 8E11E1DCD6CCE8D5

View File

@ -2,28 +2,36 @@ package cmd
import (
"github.com/carapace-sh/carapace"
"github.com/carapace-sh/carapace-bin/pkg/actions/os"
"github.com/spf13/cobra"
)
var rootCmd = &cobra.Command{
Use: "w",
Short: "Show who is logged on and what they are doing",
Long: "https://linux.die.net/man/1/w",
Long: "https://man7.org/linux/man-pages/man1/w.1.html",
Run: func(cmd *cobra.Command, args []string) {},
}
func Execute() error {
return rootCmd.Execute()
}
func init() {
carapace.Gen(rootCmd).Standalone()
rootCmd.Flags().BoolP("container", "c", false, "show container uptime")
rootCmd.Flags().BoolP("from", "f", false, "show remote hostname field")
rootCmd.Flags().Bool("help", false, "display this help and exit")
rootCmd.Flags().BoolP("ip-addr", "i", false, "display IP address instead of hostname (if possible)")
rootCmd.Flags().BoolP("no-current", "u", false, "ignore current process username")
rootCmd.Flags().BoolP("no-header", "h", false, "do not print header")
rootCmd.Flags().BoolP("old-style", "o", false, "old style output")
rootCmd.Flags().BoolP("pids", "p", false, "show the PID(s) of processes in WHAT")
rootCmd.Flags().BoolP("short", "s", false, "short format")
rootCmd.Flags().BoolP("version", "V", false, "output version information and exit")
carapace.Gen(rootCmd).PositionalCompletion(
os.ActionUsers(),
)
}