bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: doc-strings of the 'command' built-in, as output by help


From: Robert Elz
Subject: Re: doc-strings of the 'command' built-in, as output by help
Date: Tue, 26 Nov 2024 14:30:37 +0700

    Date:        Tue, 26 Nov 2024 16:23:56 +1000
    From:        Martin D Kealey <martin@kurahaupo.gen.nz>
    Message-ID:  
<CAN_U6MX2++5WvEn+b8FjGJK-4vsuTwdXrvQ0OZAmRTP5xQ+gng@mail.gmail.com>

  | I'm not convinced that ‘command’ should mention aliases at all, since
  | ‘command -v "$var"’ should tell you what ‘"$var"’ will do.
  | What it *won't* do is be expanded as an alias.

Absolute nonsense.   Once again you seem to either have no idea how shells
work, or are attempting to redefine them to suit your desire for how they
should work.

Given
        var=foo

There is literally no difference between

        command -v "$var"
and
        command -v foo

when "command" runs.   And if earlier foo had been defined as

        alias foo='ls -F'

then both forms will tell you that foo is an alias.

kre



reply via email to

[Prev in Thread] Current Thread [Next in Thread]