Wednesday, September 08, 2021

Re: Are there any protection againts heisting the "shell builtin"s?

> On Sep 8, 2021, at 02:24, jim hook <jimhook7475@mail.com> wrote:
> ...
> ex.: "unset cd" would help, but any solution in general?

I alias 'ls' to my preferred args. Sometimes I don't want those. In ksh, I just use \ls to not use the alias.

I confirmed \cd will use the builtin (at least on ksh) with:

$cd() {
> echo hello
> }
$ cd /tmp
hello
$ \cd /tmp
$ pwd
/tmp

No comments:

Post a Comment