On Mon, Oct 3, 2016, at 17:23, stephen Turner wrote:
> I see a few items have the -i removed, I can't say i use the
> interactive mode but i assume you removed it due to redundancy and so
> i'm curious how you would normally do that the suckless way.
This probably sucks since I am not an expert shell script programmer,
but here is an idea for a function in rc that is like rm -i:
fn rmi {
for (arg) {
printf 'Remove "%s"' $arg
~ $arg /* || printf ' relative to %s' `{pwd}
printf '?\n'
reply=`{line}
~ $reply [yY]* && rm $arg
}
}
For those of you who might not be too familiar with rc, see
http://doc.cat-v.org/plan_9/4th_edition/papers/rc and
http://www.in-ulm.de/~mascheck/bourne/unix-faq.shell.rc
This could also be implemented as a shell script. And it could also be
implement (as a function or shell script) in (mk)sh if you like that
better.
Received on Tue Oct 04 2016 - 03:01:46 CEST