Add a --full mode to ps (#1507)

* Add a --full mode to ps

* Use a slightly older heim
This commit is contained in:
Jonathan Turner
2020-03-20 20:53:49 +13:00
committed by GitHub
parent afa963fd50
commit b5ea522f0e
11 changed files with 236 additions and 496 deletions

View File

@ -1,3 +1,5 @@
#![type_length_limit = "2474736"]
mod nu;
mod sys;

View File

@ -134,6 +134,7 @@ async fn host(tag: Tag) -> Value {
async fn disks(tag: Tag) -> Option<UntaggedValue> {
let mut output = vec![];
let mut partitions = disk::partitions_physical();
while let Some(part) = partitions.next().await {
if let Ok(part) = part {
let mut dict = TaggedDictBuilder::with_capacity(&tag, 6);
@ -228,6 +229,7 @@ async fn temp(tag: Tag) -> Option<UntaggedValue> {
let mut output = vec![];
let mut sensors = sensors::temperatures();
while let Some(sensor) = sensors.next().await {
if let Ok(sensor) = sensor {
let mut dict = TaggedDictBuilder::new(&tag);
@ -272,6 +274,7 @@ async fn temp(tag: Tag) -> Option<UntaggedValue> {
async fn net(tag: Tag) -> Option<UntaggedValue> {
let mut output = vec![];
let mut io_counters = net::io_counters();
while let Some(nic) = io_counters.next().await {
if let Ok(nic) = nic {
let mut network_idx = TaggedDictBuilder::with_capacity(&tag, 3);