DragonFly users List (threaded) for 2009-01
Re: fdisk implementation [read this before deciding what to do]
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-Trace: 1231482798 crater_reader.dragonflybsd.org 882 126.96.36.199
Xref: crater_reader.dragonflybsd.org dragonfly.users:11869
Vincent Stemen schrieb:
> Yes, in the traditional layered Unix approach, this tool was
> specifically designed to be easier to automate and to write interactive
> front ends than the existing tools. It would probably be easy enough to
> add a simple interactive mode to the tool itself, but I hesitate to do
> that because, as you mentioned, I can do the same thing with a shell
> script, making it easy to tune the interactive behavior and to have
> multiple different interfaces that are as simple or as sophisticated as
> you want.
Yes, but the downside of this is that there are two distinct interfaces,
one for the tool itself (getopt_long() stuff) and another for the
interactive mode which is put on top of it with shell scripts.
A better idea IMO is to have a built-in interactive mode and allow for
feeding those commands to the tool also from a file. In the tool it's
just a matter of either reading from stdin or from a file.