fixing rm * (was: Worm/Passwords)

Alan Char achar at atari.UUCP
Tue Nov 29 11:32:34 AEST 1988


In article <727 at quintus.UUCP> ok at quintus.UUCP (Richard A. O'Keefe) writes:
|In article <812 at hadron.UUCP> jsdy at hadron.UUCP (Joseph S. D. Yao) writes:
|[about rm *]
||What I did, a decade ago, was to have a list of _commands_ which the
||shell, after calling glob, would always prompt for after printing out
||the entire expanded command line.  The list included "rm" and "rmdir".
||No prompting if "glob" was not called.
|
|Nice one, but how does this handle user commands with similar properties?
|(For example, "a.rm".)
|One answer, of course, would be to have a
|	GLOBASK=rm:rmdir
|shell variable, so that one could put
|	GLOBASK=a.rm:$GLOBASK
|in ones .profile.  (Did I just make a constructive suggestion?  Oops.)

GLOBASK is not that different from expandcheck.  In fact,
setting GLOBASK=<all commands> is exactly the same as setting
expandcheck=1 modulo the prompt text.  You mean there isn't
some value I can use for GLOBASK to ask for all commands?  Oh.
--Alan Char



More information about the Comp.unix.wizards mailing list