Re: [hackers] [sbase][PATCH 2/2] cp, mv, rm: Add `-i` for confirmation prompts

2022-11-25 Thread Santtu Lakkala
On 19.11.2022 23.46, Alan Potteiger wrote: diff --git a/mv.c b/mv.c index 8441f9c..51efde5 100644 --- a/mv.c +++ b/mv.c @@ -49,6 +57,9 @@ main(int argc, char *argv[]) ARGBEGIN { case 'f': break; +case 'i': +mv_iflag = 1; +

Re: [hackers] [sbase][PATCH 1/2] libutil: Implement a simple yes/no prompt

2022-11-25 Thread Santtu Lakkala
On 20.11.2022 16.58, Tom Schwindl wrote:> I don't quite get why there is a variable argument list instead of just using a single argument which contains the prompt. I can't see the need for formatting in a y/n prompt. I also wouldn't use `nomsg' since it just polutes stderr. The specification f