uutils / coreutils

Cross-platform Rust rewrite of the GNU coreutils
https://uutils.github.io/
MIT License
17.61k stars 1.27k forks source link

Can we add a "coreutils listutils" entry to help with automated installations? #6466

Closed alshdavid closed 3 months ago

alshdavid commented 3 months ago

I like to install uutils by hand from the binary. To do this I wget the latest binary and create symlinks for each util within coreutils

The output of coreutils at the moment is:

$ ./coreutils
coreutils 0.0.26 (multi-call binary)

Usage: coreutils [function [arguments...]]

Currently defined functions:

    [, arch, b2sum, b3sum, base32, base64, basename, basenc, cat, chgrp, chmod, chown, chroot,
    cksum, comm, cp, csplit, cut, date, dd, df, dir, dircolors, dirname, du, echo, env, expand,
    expr, factor, false, fmt, fold, groups, hashsum, head, hostid, hostname, id, install, join,
    kill, link, ln, logname, ls, md5sum, mkdir, mkfifo, mknod, mktemp, more, mv, nice, nl,
    nohup, nproc, numfmt, od, paste, pathchk, pinky, pr, printenv, printf, ptx, pwd, readlink,
    realpath, rm, rmdir, seq, sha1sum, sha224sum, sha256sum, sha3-224sum, sha3-256sum, sha3-
    384sum, sha3-512sum, sha384sum, sha3sum, sha512sum, shake128sum, shake256sum, shred, shuf,
    sleep, sort, split, stat, stdbuf, stty, sum, sync, tac, tail, tee, test, timeout, touch,
    tr, true, truncate, tsort, tty, uname, unexpand, uniq, unlink, uptime, users, vdir, wc, who,
    whoami, yes

Which is a little hard to parse. Could we add a coreutils listutils function that prints the utils with a newline separator?

$ ./coreutils listutils
arch
b2sum
b3sum
base32
base64
basename
...

This would allow me to write a simplified script that automates the generation of symlinks from a bash/powershell script

cakebaker commented 3 months ago

It's already there: coreutils --list

alshdavid commented 3 months ago

Am I missing something? image

tertsdiepraam commented 3 months ago

https://github.com/uutils/coreutils/pull/6251

It's fairly new so you might not have a version with that feature yet.

JoshMcguigan commented 3 months ago

This is great!

Does uutils/coreutils have a policy on tagging new versions? A new tagged release would help pull this into package managers.

Either way, thanks for implementing this!

sylvestre commented 3 months ago

Does uutils/coreutils have a policy on tagging new versions?

when someone asks :) and around every two months

JoshMcguigan commented 3 months ago

Thanks for tagging 0.0.27!

sylvestre commented 3 months ago

welcome :)