feat: 新增 proc.list/user.list/pkg.list 命令
proc.list 列出所有进程(ps aux/tasklist) user.list 列出系统用户(getent passwd/net user) pkg.list 列出已安装软件包(dpkg/rpm/apk/brew/winget)
This commit is contained in:
@@ -513,6 +513,15 @@ func Builtin() *Registry {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "pkg.list",
|
||||
Group: "pkg",
|
||||
Summary: "列出已安装的软件包",
|
||||
Action: "列出系统中已安装的软件包。" +
|
||||
"Linux: dpkg -l(Debian/Ubuntu)/ rpm -qa(CentOS/RHEL)/ apk list(Alpine);" +
|
||||
"macOS: brew list;Windows: winget list",
|
||||
Variants: threePlatformBuiltins("pkg.list"),
|
||||
},
|
||||
{
|
||||
ID: "pkg.refreshindex",
|
||||
Group: "pkg",
|
||||
@@ -551,6 +560,14 @@ func Builtin() *Registry {
|
||||
},
|
||||
},
|
||||
},
|
||||
{
|
||||
ID: "user.list",
|
||||
Group: "user",
|
||||
Summary: "列出系统用户",
|
||||
Action: "列出系统中所有用户账户。" +
|
||||
"Linux/macOS: getent passwd 或 /etc/passwd;Windows: net user",
|
||||
Variants: threePlatformBuiltins("user.list"),
|
||||
},
|
||||
{
|
||||
ID: "user.grant",
|
||||
Group: "user",
|
||||
@@ -720,6 +737,13 @@ func Builtin() *Registry {
|
||||
},
|
||||
|
||||
// ----- proc additions -----
|
||||
{
|
||||
ID: "proc.list",
|
||||
Group: "proc",
|
||||
Summary: "列出所有进程",
|
||||
Action: "列出系统中所有正在运行的进程。Linux/macOS: ps aux;Windows: tasklist",
|
||||
Variants: threePlatformBuiltins("proc.list"),
|
||||
},
|
||||
{
|
||||
ID: "proc.topmem",
|
||||
Group: "proc",
|
||||
|
||||
@@ -25,13 +25,13 @@ func TestBuiltinIDsStable(t *testing.T) {
|
||||
"docker.prunebuilder", "docker.prunevolumes", "docker.clearall",
|
||||
"docker.compose.up", "docker.compose.down", "docker.compose.ps", "docker.compose.logs",
|
||||
"diagnose",
|
||||
"disk.usage", "net.pids", "net.ports", "proc.nohup", "proc.wait", "java.run", "git.retime", "pkg.refreshindex",
|
||||
"user.grant", "user.revoke",
|
||||
"disk.usage", "net.pids", "net.ports", "proc.nohup", "proc.wait", "java.run", "git.retime", "pkg.list", "pkg.refreshindex",
|
||||
"user.list", "user.grant", "user.revoke",
|
||||
"file.findbig", "file.findrecent", "file.findname",
|
||||
"svc.list", "svc.status", "svc.enable", "svc.disable", "svc.logs",
|
||||
"archive.extract",
|
||||
"sysinfo",
|
||||
"proc.topmem", "proc.topcpu", "proc.killname",
|
||||
"proc.list", "proc.topmem", "proc.topcpu", "proc.killname",
|
||||
"net.ping", "net.trace", "net.dns", "net.curl",
|
||||
"log.list", "log.search", "log.last",
|
||||
"fw.status", "fw.allow", "fw.deny",
|
||||
|
||||
Reference in New Issue
Block a user