who: add entries

This commit is contained in:
Knight 2016-08-11 00:19:26 +08:00
parent 548b58a09e
commit 8c6cd72848
5 changed files with 30 additions and 2 deletions

View file

@ -34,6 +34,7 @@ unix = [
"unlink",
"uptime",
"users",
"who",
]
generic = [
"base32",
@ -187,6 +188,7 @@ unlink = { optional=true, path="src/unlink" }
uptime = { optional=true, path="src/uptime" }
users = { optional=true, path="src/users" }
wc = { optional=true, path="src/wc" }
who = { optional=true, path="src/who" }
whoami = { optional=true, path="src/whoami" }
yes = { optional=true, path="src/yes" }

View file

@ -129,7 +129,8 @@ UNIX_PROGS := \
uname \
unlink \
uptime \
users
users \
who
ifneq ($(OS),Windows_NT)
PROGS := $(PROGS) $(UNIX_PROGS)

View file

@ -170,7 +170,6 @@ To do
- tail (not all features implemented)
- test (not all features implemented)
- uniq (a couple of missing options)
- who
License
-------

21
src/who/Cargo.toml Normal file
View file

@ -0,0 +1,21 @@
[package]
name = "who"
version = "0.0.1"
authors = []
[lib]
name = "uu_who"
path = "who.rs"
[dependencies.uucore]
path = "../uucore"
default-features = false
features = ["utmpx"]
[dependencies.clippy]
version = "*"
optional = true
[[bin]]
name = "who"
path = "main.rs"

5
src/who/main.rs Normal file
View file

@ -0,0 +1,5 @@
extern crate uu_who;
fn main() {
std::process::exit(uu_who::uumain(std::env::args().collect()));
}