Timo Buhrmester said: > From src/bin/cp/cp.c: > > while ((ch = getopt(argc, argv, "HLNPRfailprv")) != -1) > > [...] > > case 'i': > > iflag = isatty(fileno(stdin)); > The -i in cp -i is ignored if standard input isn't a tty. > > This breaks doing something along the lines of ``yes n | cp -i [...]''
Why would anyone want that? FWIW interactive mode does only make sense in cases there is an operator with no other means to influence the process but to use tty. The only scenario where non-tty interactive mode really makes sense is some script/program which tries to parse cp's output; preventing that is actually a feature. -- Dmitrij D. Czarkoff
