diff --git a/crates/nu_plugin_sys/src/sys.rs b/crates/nu_plugin_sys/src/sys.rs index 7a7e9b48b..d401899f0 100644 --- a/crates/nu_plugin_sys/src/sys.rs +++ b/crates/nu_plugin_sys/src/sys.rs @@ -113,7 +113,8 @@ async fn host(tag: Tag) -> Value { dict.insert_value("uptime", uptime_dict); } - // Users + // Sessions + // note: the heim host module has nomenclature "users" let mut users = host::users(); let mut user_vec = vec![]; while let Some(user) = users.next().await { @@ -125,7 +126,7 @@ async fn host(tag: Tag) -> Value { } } let user_list = UntaggedValue::Table(user_vec); - dict.insert_untagged("users", user_list); + dict.insert_untagged("sessions", user_list); dict.into_value() } diff --git a/docs/commands/sys.md b/docs/commands/sys.md index b21a0ef21..c490afb12 100644 --- a/docs/commands/sys.md +++ b/docs/commands/sys.md @@ -1,6 +1,6 @@ # sys -This command gives information about the system where nu is running on. +This command gives information about the system nu is running on. ## Examples @@ -13,7 +13,7 @@ This command gives information about the system where nu is running on. ━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━ > sys | get host ━━━━━━━━┯━━━━━━━━━┯━━━━━━━━━━━━━━┯━━━━━━━━┯━━━━━━━━━━━━━━━━┯━━━━━━━━━━━━━━━━━━ - name │ release │ hostname │ arch │ uptime │ users + name │ release │ hostname │ arch │ uptime │ sessions ────────┼─────────┼──────────────┼────────┼────────────────┼────────────────── Darwin │ 18.7.0 │ C02Y437GJGH6 │ x86_64 │ [table: 1 row] │ [table: 17 rows] ━━━━━━━━┷━━━━━━━━━┷━━━━━━━━━━━━━━┷━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━ @@ -29,4 +29,4 @@ This command gives information about the system where nu is running on. ─────────┼──────────┼────────────┼─────────── 34.4 GB │ 545.0 MB │ 2.1 GB │ 723.0 MB ━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━ -``` \ No newline at end of file +```