mirror of
https://github.com/nushell/nushell
synced 2025-01-26 11:55:20 +00:00
account twice while only one exists (macOS) - renamed host.users to host.sessions
This commit is contained in:
parent
3afb53b8ce
commit
5b0b2f1ddd
2 changed files with 6 additions and 5 deletions
|
@ -113,7 +113,8 @@ async fn host(tag: Tag) -> Value {
|
||||||
dict.insert_value("uptime", uptime_dict);
|
dict.insert_value("uptime", uptime_dict);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Users
|
// Sessions
|
||||||
|
// note: the heim host module has nomenclature "users"
|
||||||
let mut users = host::users();
|
let mut users = host::users();
|
||||||
let mut user_vec = vec![];
|
let mut user_vec = vec![];
|
||||||
while let Some(user) = users.next().await {
|
while let Some(user) = users.next().await {
|
||||||
|
@ -125,7 +126,7 @@ async fn host(tag: Tag) -> Value {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let user_list = UntaggedValue::Table(user_vec);
|
let user_list = UntaggedValue::Table(user_vec);
|
||||||
dict.insert_untagged("users", user_list);
|
dict.insert_untagged("sessions", user_list);
|
||||||
|
|
||||||
dict.into_value()
|
dict.into_value()
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# sys
|
# 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
|
## Examples
|
||||||
|
|
||||||
|
@ -13,7 +13,7 @@ This command gives information about the system where nu is running on.
|
||||||
━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━━━┷━━━━━━━━━━━━━━━━
|
||||||
> sys | get host
|
> 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]
|
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
|
34.4 GB │ 545.0 MB │ 2.1 GB │ 723.0 MB
|
||||||
━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━
|
━━━━━━━━━┷━━━━━━━━━━┷━━━━━━━━━━━━┷━━━━━━━━━━━
|
||||||
```
|
```
|
||||||
|
|
Loading…
Reference in a new issue