Mail Archives: djgpp/2002/01/25/09:30:18
JT Williams <jeffw AT darwin DOT sfbr DOT org> wrote:
> -: > Can I selectively disable bash builtin commands?
> -:
> -: According to the Bash manual, there's a special command to do that:
> -: "enable -n".
> My initial message was misworded; sorry about that. I knew about
> the enable command; what I was looking for is a way to disable a bash
> *keyword* (not a builtin). The only way I know to do this is to quote
> the keyword, e.g., type "select" or 'select' (with quotes) or even \select
> (with backslash) to force a path search for a `select' program or script.
That's the only kind of method existing, I think. Reserved words are
sacrosanct to the shell.
> Hackers can live with this, even take a perverse delight in it, but Joe
> L User isn't known for tolerating such quirks.
These aren't exactly "quirks", this is what having a programming
language of any sort (which Bourne shell definitely is) implies: some
words are reserved by the language, so you can't use them freely for
your own.
The only way this can ever trouble the user would be if some program
was installed under the name 'select' --- which is quite obviously a
rather bad idea, for exactly this reason.
> I suppose I could build a custom bash for this particular
> application....
... or give that application a less troublesome name.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -