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

2024-11-26 Thread Chet Ramey
On 11/26/24 1:39 PM, Andrew Davis wrote: -vFor each COMMAND, print a string to indicate how it would be interpreted by the shell. The command word is printed for shell functions, built-ins, and keywords, while a pathname is printed for executables found in PATH. Aliases are printed with th

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

2024-11-26 Thread Andrew Davis
On Mon, Nov 25, 2024 at 9:04 PM Martin D Kealey wrote: > > For both ‘command -v’ and ‘command -V’, there are no combinations of > options for ‘type’ that will produce the same output in all cases. > For executables, aliases, functions, built-ins, and keywords, the output of `command -V` (capital

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

2024-11-25 Thread Robert Elz
Date:Tue, 26 Nov 2024 16:23:56 +1000 From:Martin D Kealey Message-ID: | 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. Absolut

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

2024-11-25 Thread Martin D Kealey
On Tue, 26 Nov 2024 at 12:43, Lawrence Velázquez wrote: > On Mon, Nov 25, 2024, at 9:03 PM, Martin D Kealey wrote: > > I keep "similar" there because ‘type -a COMMAND’ shows all possible > matches > > for COMMAND, whereas ‘command -V’ only does that when COMMAND is NOT an > > alias. > > I'm not s

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

2024-11-25 Thread Oğuz
On Tuesday, November 26, 2024, Martin D Kealey wrote: > > Would anyone object to adjusting the output of ‘command -V’ to be identical > to ‘type -a’? > https://pubs.opengroup.org/onlinepubs/9799919799/utilities/command.html -- Oğuz

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

2024-11-25 Thread #!microsuxx
~ $ command -v bash /data/data/com.termux/files/usr/bin/bash ~ $ command -V bash bash is /data/data/com.termux/files/usr/bin/bash V adds english text On Tue, Nov 26, 2024, 3:44 AM Lawrence Velázquez wrote: > On Mon, Nov 25, 2024, at 9:03 PM, Martin D Kealey wrote: > > I keep "similar" there bec

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

2024-11-25 Thread Lawrence Velázquez
On Mon, Nov 25, 2024, at 9:47 PM, #!microsuxx wrote: > V adds english text That's not what I'm talking about. -- vq

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

2024-11-25 Thread Lawrence Velázquez
On Mon, Nov 25, 2024, at 9:03 PM, Martin D Kealey wrote: > I keep "similar" there because ‘type -a COMMAND’ shows all possible matches > for COMMAND, whereas ‘command -V’ only does that when COMMAND is NOT an > alias. I'm not seeing that "command -V" behavior. $ type -a bash bash

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

2024-11-25 Thread Martin D Kealey
On Tue, 26 Nov 2024 at 05:35, Andrew Davis wrote: > When running 'help command' in the shell, the output contains: > > > -vprint a description of COMMAND similar to the `type' builtin > > -Vprint a more verbose description of each COMMAND > > This seems to be opposite to the a

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

2024-11-25 Thread Chet Ramey
On 11/25/24 2:35 PM, Andrew Davis wrote: When running 'help command' in the shell, the output contains: -vprint a description of COMMAND similar to the `type' builtin -Vprint a more verbose description of each COMMAND This seems to be opposite to the actual behaviour of

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

2024-11-25 Thread Andrew Davis
When running 'help command' in the shell, the output contains: > -vprint a description of COMMAND similar to the `type' builtin > -Vprint a more verbose description of each COMMAND This seems to be opposite to the actual behaviour of 'command', in which '-V' (capital V) produc