Wim Hueskes
046ff62af6
more: fix build on windows
2016-10-06 23:35:16 +02:00
Wim Hueskes
4f91662057
who: use i64 instead of time_t
...
fixes build on raspberry pi 2 (armv7-unknown-linux-gnueabihf)
2016-09-03 22:18:10 +02:00
Alex Lyon
362cabe1a6
hashsum: implement SHAKE-128 and SHAKE-256
2016-08-30 17:33:18 -07:00
knight42
d0196b82ad
touch: respect -h
2016-08-28 07:12:25 +08:00
knight42
89ac03d1c2
uucore::fs: add fn resolve_relative_path
2016-08-28 00:02:58 +08:00
knight42
136ca4e197
chgrp,chown: fix bug in option --preserve-root
2016-08-28 00:02:58 +08:00
Martin Kysel
23bab3df69
moved more to unix utils, minor review updates
2016-08-23 11:40:09 +01:00
Martin Kysel
a90aec3f1b
add author name
2016-08-23 10:50:45 +01:00
Martin Kysel
7d77b9720d
Initial more implementation
2016-08-23 10:45:51 +01:00
Nathan Ross
ae0e1c4768
Merge pull request #977 from knight42/chgrp
...
Implement chgrp
2016-08-21 06:39:54 -04:00
Knight
9dda0bcd25
chgrp: implemented
2016-08-21 17:04:38 +08:00
Knight
8cba71adb4
chgrp: add entries
2016-08-21 17:04:02 +08:00
Knight
a4bf852207
mv: cleanup the code
2016-08-21 14:57:28 +08:00
mpkh
2981eb5112
Merge pull request #975 from nathanross/normalize-coreopts-squashed
...
DRYer code and more UX consistency through use of coreopts
2016-08-20 18:44:17 +00:00
Nathan Ross
36503a77c7
impl: use coreopts for brevity and consistent UX
2016-08-20 10:07:24 -04:00
Nathan Ross
edc3bf7c08
impl: dryer use of coreopts
2016-08-20 10:07:24 -04:00
Nathan Ross
ee3aaa017f
uucore: allow 'wrong number of arguments' macro to be more precise
2016-08-20 10:07:08 -04:00
Michael Gehring
dcefbd54c6
Merge pull request #974 from knight42/fix-bugs
...
Fix bugs of `pinky` and `who`
2016-08-20 15:16:19 +02:00
Jian Zeng
14a34b48bf
Merge pull request #969 from robertclancy/tail-f-dev-stdin-bug
...
tail: fix bug when following /dev/stdin
2016-08-20 20:25:08 +08:00
Knight
fb53c019b4
who: limit the parts of split host to 2
2016-08-20 20:22:18 +08:00
Knight
34d2224098
pinky: correct the test
2016-08-20 20:22:18 +08:00
Robert Clancy
3a0c23561e
tail: fix bug when following /dev/stdin
...
main panics when following /dev/stdin since /dev/stdin is not seekable.
Check to see if file is seekable and use unbounded_seek if so.
Also `tail -f` with no files should not follow stdin.
2016-08-20 11:47:02 +01:00
Nathan Ross
268b691881
uucore: add support for optflagopt to coreopts
2016-08-20 05:58:36 -04:00
Nathan Ross
cb1b32cda1
uucore: fix utility name in coreopts parsing error messages
2016-08-20 05:58:36 -04:00
Knight
9ecf899e3d
Remove uucore::c_types
2016-08-20 12:12:49 +08:00
Knight
ddf47fab31
groups: use uucore::entries::get_groups instead
2016-08-20 11:59:58 +08:00
Knight
f49ee5b58b
uname: use utsname in libc instead
2016-08-20 11:59:58 +08:00
Knight
ac6bc5886b
arch: use utsname in libc instead
2016-08-20 11:59:58 +08:00
Knight
c63aa19cd1
Add uucore::utsname to get system info
2016-08-20 11:59:58 +08:00
Knight
b6c864b7f3
uucore::process: add functions to obtain uid/gid, euid/egid
2016-08-20 03:24:23 +08:00
Knight
369c2c2d83
id: use uucore::entries
2016-08-20 03:24:23 +08:00
Knight
2b96f8f0c1
chroot: use uucore::entries
2016-08-20 03:10:37 +08:00
Knight
270290efe6
whoami: use uucore::entries
2016-08-20 03:10:36 +08:00
Knight
99f0114450
stat: use uucore::entries
2016-08-20 03:10:36 +08:00
Knight
40e6c5a397
pinky: use uucore::entries
2016-08-20 03:10:36 +08:00
Knight
f66aaa8b78
ls: use uucore::entries
2016-08-20 03:10:36 +08:00
Knight
40e01b94f3
chown: use uucore::entries
2016-08-20 03:10:36 +08:00
Knight
799804e455
Add uucore::entries
2016-08-20 03:10:36 +08:00
Knight
c2fb66dfcb
uucore::utmpx: fix doctest errors
2016-08-20 02:55:17 +08:00
Knight
bc61634dba
tr: use HashMap in stdlib instead of vec_map
2016-08-20 02:25:55 +08:00
Nathan Ross
9d2616442a
Merge pull request #963 from alsuren/sort--merge
...
Implement sort --merge
2016-08-12 20:42:30 -04:00
David Laban
cf93826eee
sort --check refactor to use iterator
...
This allows us to check files without bringing them entirely into
memory. Also makes it easier to find the disorder in
(seq 9; echo 0) | sort --check
(points at the end of the file, where our previous version would
point at the start of the file)
Itertools' .coalesce() was the most useful helper that I could find
for comparing adjacent values in an iterator. It is designed for
implementing things like .dedup(), so the resulting code is a little
unintuitive.
2016-08-13 00:42:44 +01:00
David Laban
3531c46fb8
sort --merge --unique
...
This uses Itertools' dedup() rather than Vec::dedup(). There is probably
a cleaner, more polymorphic way to do this. Suggestions welcome.
2016-08-13 00:42:44 +01:00
David Laban
e1af1520e7
sort: make compare_by honour settings.reverse
...
This allows sort --merge --reverse to work as well.
2016-08-13 00:42:43 +01:00
David Laban
8a8319a337
sort --merge works, but ignores --unique and --reverse
...
FileMerger receives Lines Iterables of the pre-sorted input files
via push_file() It implements Iterator, which yields lines from the
input files in (merged) sorted order. If the input files are not sorted,
then the behavior is undefined.
Internally, FileMerger uses a
std::collections::BinaryHeap<MergeableFile>.
MergeableFile is an internal helper that implements Ord in a way that
BinaryHeap can use (note that we want smallest-first, but BinaryHeap
returns largest first, so MergeableFile::cmp() calls reverse() on
whatever compare_by() returns.
2016-08-13 00:42:43 +01:00
David Laban
76abc7e51d
sort: refactor compare_fns into Settings
...
Also split out a compare_by(a, b, settings) helper function,
which may be used by --merge, later.
2016-08-13 00:26:20 +01:00
Knight
f19d361013
uniq: add test for case-insensitive comparison
2016-08-13 02:04:19 +08:00
Knight
0ea5314ea1
uucore: make libc optional
2016-08-13 02:00:20 +08:00
mpkh
96e8748336
Merge pull request #945 from nathanross/cut-fix-chars-ranges
...
cut: make chars mode use byte mode behavior
2016-08-12 04:56:47 +00:00
nathanross
f2dc230d0e
uucore: coreopts alignment, spacing, and optional usage
2016-08-11 23:20:39 -04:00