Gerry Lawrence writes: > David King wrote: > > > Since he says: > > > > > In this case, you'll need to unset rmstar to get rm to not annoy > > > you. > > > > I assume that 'rmstar' is a shell variable, and he means that it's a > > shell with an 'rm' function replacing the behaviour of 'rm' > > specifically? > > Ya know, this is interesting. Under my tcsh, the rmstar variable does > control the /bin/rm command, and controls the annoyance. The question > is, how does tcsh control rm?
The shell doesn't have to 'control' rm as such; given that the shell is responsible for processing your input and passing it on to the command, it can do whatever it wants before running it. In the case of rm * one of the things it obviously has to do is expand * into a list of files in the current directory. The code to do that could easily check to see if the command to be run is rm, and if so interrupt proceedings with the prompty thing. Smylers
