MLUG: Re: [MLUG] which command in bash and elsewhere
Re: [MLUG] which command in bash and elsewhere
Email address obfuscation in effect -- please click here to turn it off.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
On 11/3/07, Mike Miller <EMAIL:PROTECTED> wrote:
>
> Tell us if you remember because that was a good one.  In tcsh, which I am
> in the process of abandoning in favor of bash, you don't get that problem.
> It always tells you correctly which command you are getting - alias,
> builtin, etc.  I thought bash could be configured to do this correctly,
> but maybe I'm wrong.

I will check on that, but I am not optimistic.

> I can't find info on that right now.  "man which"
> does give some pointers on use of aliases for "which," but I don't know if
> that solves this problem.  "which" can definitely understand aliases but
> maybe not shell built-ins.

If which isn't a built-in and I haven't lost all of my brain cells
yet, it just gets argc and argv, so it can't tell who called it, which
means it can't say to itself "ah; bash called me so I should point out
that in this case the user is likely to get a built-in for 'time'" If
it were a built-in, I think it could scan the names of the other
built-ins and figure this out.

jking

_______________________________________________
members mailing list
EMAIL:PROTECTED
http://mlug.missouri.edu/mailman/listinfo/members