Fix 'ps -l' output when a process doesn't have a parent process.
Before, ps would not insert a value if the process didn't have a parent.
Now, ps will insert an empty cell. This caused broken tables as some
rows didn't have all the columns.
@@ -45,6 +45,8 @@ pub async fn ps(tag: Tag, long: bool) -> Result<Vec<Value>, ShellError> {
if long {
if let Some(parent) = result.parent() {
dict.insert_untagged("parent", UntaggedValue::int(parent));
+ } else {
+ dict.insert_untagged("parent", UntaggedValue::nothing());
}
dict.insert_untagged("exe", UntaggedValue::filepath(result.exe()));
dict.insert_untagged("command", UntaggedValue::string(result.cmd().join(" ")));
