[Toybox] [landley/toybox] Add ln -r (#145)

enh enh at google.com
Wed Oct 30 08:18:24 PDT 2019


On Wed, Oct 30, 2019 at 8:15 AM Andrew Ilijic <ilijic.andrew at gmail.com> wrote:
>
> Hi Rob,
>
> > Hey Andrew: you wanted todo items, here's a fresh one if it looks interesting. :)
> I read through the chain of emails and realized you were only referring to
> `realpath` & `readlink`, lol.
>
> To restate the request, you want the options `-LPefmnqsz --relative-to
> --relative-base` implemented for `realpath`. These options are the
> same or similar
> to the `readlink` options, and so we should reuse the existing code.
> Can you give
> me an example of other merged commands?

(`grep -r FOR_` should show you all the places this happens. some are
a lot simpler than others, so you might want to look at a few until
you find a really short one.)

> Looking at the dispatch code that runs on the first argument, it seems
> we need the
> function `realpath_main`. My first thought is, use realpath_main as a wrapper,
> manipulate the flags that need it, and then call into and use as much of
> `readlink` as we can, does that make sense?
>
> ~Andrew



More information about the Toybox mailing list