Skip to content

Add Windows process listing command ps #54

@caomengxuan666

Description

@caomengxuan666

Summary

Users asking for kill also asked for a simple ps command, since terminating a process by PID is much easier when there is a native way to list processes first.

This came up in #45:

ps is not GNU coreutils, so this should probably be treated as a Windows-specific convenience command rather than part of the strict coreutils set.

Proposed behavior

Add a small native Windows ps implementation that lists running processes, for example:

ps
ps -A
ps -e
ps aux
ps -p <PID>
ps --ppid <PID>
ps -o pid,ppid,comm

A minimal output could include PID, parent PID, and process image name. A few common filtering/formatting options would make it useful together with kill.

This should be implemented with Windows APIs rather than wrapping Sysinternals tools, so the package does not depend on external binaries.

For PowerShell integration, ps should also be added to the PSReadLine rewrite list so bare ps can be routed to ps.cmd in interactive PowerShell sessions, even though Get-Command ps may still show the built-in PowerShell alias.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions