On 2/18/23 12:50 AM, Oğuz İsmail Uysal wrote:
$ alias foo='cat
On 2/18/23 2:05 AM, Chet Ramey wrote:
If the shell reads an unquoted word in the right position, it checks
the word to see if it matches an alias name. If it matches, the shell
replaces the word [in the input] with the alias value, and reads that
value as if it had been read [from the input] inst
Date:Sat, 18 Feb 2023 12:21:49 +1000
From:Martin D Kealey
Message-ID:
| Both of these are clearly wrong,
Yes, which is why POSIX is changing. I am concerned less about
bash (and other shell) doc about the details of all of this,
more useful to suggest that users
On 2/14/23 2:58 PM, Dale R. Worley wrote:
> Though I think by "keyword" he means "reserved word".
>
Yes, though in my defense, the bash man page liberally uses the term
"keyword".
On Fri, 17 Feb 2023 at 01:14, Chet Ramey wrote
> I think the issue is that he's applying a grammar interpretation
On 2/17/23 11:36 AM, Dale R. Worley wrote:
I think this change covers the case we're talking about, clarifies the
second sentence a bit, and seems to be well-aligned with the more
detailed truth:
Aliases allow a string to be substituted for a word when it is
used as the first wo
plus
if an alias definition ends with a space , when in use , further aliases
may get resolved ( substituded , before parsing code further )
On Fri, Feb 17, 2023, 5:37 PM Dale R. Worley wrote:
> Chet Ramey writes:
> > On 2/14/23 2:58 PM, Dale R. Worley wrote:
> Looking at the manual page,
Chet Ramey writes:
> On 2/14/23 2:58 PM, Dale R. Worley wrote:
Looking at the manual page, it says
ALIASES
Aliases allow a string to be substituted for a word when it is
used as
the first word of a simple command.
>>
>> Martin suggested (but II
On Thu, Feb 16, 2023, 4:14 PM Chet Ramey wrote:
> On 2/14/23 2:58 PM, Dale R. Worley wrote:
> >>> Looking at the manual page, it says
> >>>
> >>> ALIASES
> >>> Aliases allow a string to be substituted for a word when it
> is used as
> >>> the first word of a simple command.
On 2/14/23 2:58 PM, Dale R. Worley wrote:
Looking at the manual page, it says
ALIASES
Aliases allow a string to be substituted for a word when it is used as
the first word of a simple command.
Martin suggested (but IIUC didn't sent to this list):
"Beginning of a simple c
On Tue, Feb 14, 2023, 8:58 PM Dale R. Worley wrote:
> >> Looking at the manual page, it says
> >>
> >> ALIASES
> >>Aliases allow a string to be substituted for a word when it is
> used as
> >>the first word of a simple command.
>
> Martin suggested (but IIUC didn't sent to th
>> Looking at the manual page, it says
>>
>> ALIASES
>>Aliases allow a string to be substituted for a word when it is used
>> as
>>the first word of a simple command.
Martin suggested (but IIUC didn't sent to this list):
> "Beginning of a simple command" should probably be re
Date:Tue, 7 Feb 2023 14:35:54 -0500
From:Chet Ramey
Message-ID:
| On 2/7/23 12:33 PM, Dale R. Worley wrote: (That was 7 Feb, not 2 July...)
| > That makes it clear why the second case behaves as it does. But my
| > reading of the definition of "simple command
On 2/7/23 12:33 PM, Dale R. Worley wrote:
ALIASES
Aliases allow a string to be substituted for a word when it is used as
the first word of a simple command.
That makes it clear why the second case behaves as it does. But my
reading of the definition of "simple commands" i
Robert Elz writes:
> | Aliases are not used in bash scripts, unless bash is invoked in POSIX
> | compatibility mode, or the "expand_aliases" shopt is turned on.
>
> I think that's what must have happened ... the infinite loop of
> echo commands suggests that the function definition
>
> c
Indeed, it appears I enabled expand_aliases. I'll probably reconsider it.
Date:Mon, 2 Jan 2023 10:02:45 -0500
From:Greg Wooledge
Message-ID:
| Aliases are not used in bash scripts, unless bash is invoked in POSIX
| compatibility mode, or the "expand_aliases" shopt is turned on.
I think that's what must have happened ... the infinite l
On Mon, Jan 02, 2023 at 10:13:28AM +0200, Yuri Kanivetsky wrote:
> Hi,
>
> #!/usr/bin/env bash
> set -eu
> alias cmd=echo
Aliases are not used in bash scripts, unless bash is invoked in POSIX
compatibility mode, or the "expand_aliases" shopt is turned on.
Hi,
#!/usr/bin/env bash
set -eu
alias cmd=echo
cmd() {
echo "$@"
}
set -x
cmd a b c
$ ./a.sh
+ echo a b c
+ echo a b c
...
+ echo a b c
+ echo a b c
Command terminated
Sounds like a bug. I'd expect it to notice the alias, turn "cmd a b c"
into "echo a b c" and print the letters.
Regards,
Y
18 matches
Mail list logo