Skip to content

Is there a way to use coreutils as a library? #6103

Closed Answered by tertsdiepraam
linrongbin16 asked this question in Q&A
Discussion options

You must be logged in to vote

Yes, in two ways. It's possible to call the uumain method which will just run the util. This is what the multicall binary uses as well. However, note that we might change that API without warning.

The second way is to do some argument parsing yourself and then call the util. This is how nushell uses coreutils. We have only exposed the API for that in a few utils though.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@linrongbin16
Comment options

Answer selected by linrongbin16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants