From 8a030f3bfc79aa2577e8a5c1c8f71b8302ea33e5 Mon Sep 17 00:00:00 2001 From: Jelle Besseling Date: Thu, 6 Apr 2023 14:32:12 +0200 Subject: [PATCH] Add ppid example for ps (#8768) # Description Add an extra example for the `ps` command # User-Facing Changes Only adds this example: ![image](https://user-images.githubusercontent.com/1576660/230374829-dc957b89-0a76-451d-baba-5e4463b150c3.png) # Tests + Formatting N/A # After Submitting This is related to https://github.com/nushell/nushell.github.io/pull/864 Co-authored-by: Jelle Besseling --- crates/nu-command/src/system/ps.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/crates/nu-command/src/system/ps.rs b/crates/nu-command/src/system/ps.rs index 071366440b..c549efa8a6 100644 --- a/crates/nu-command/src/system/ps.rs +++ b/crates/nu-command/src/system/ps.rs @@ -67,6 +67,11 @@ impl Command for Ps { example: "ps | where name =~ 'nu'", result: None, }, + Example { + description: "Get the parent process id of the current nu process", + example: "ps | where pid == $nu.pid | get ppid", + result: None, + }, ] } }