bug-bash
[Top][All Lists]
Advanced

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

Re: Having an alias and a function with the same name leads to some sort


From: alex xmb ratchev
Subject: Re: Having an alias and a function with the same name leads to some sort of recursion
Date: Wed, 15 Feb 2023 02:08:40 +0100

On Tue, Feb 14, 2023, 8:58 PM Dale R. Worley <worley@alum.mit.edu> 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 command" should probably be replaced by something
> > more along the lines of "beginning of any command that does not start
> with
> > a keyword (such as "while", "if", "case", etc) or assignment.
>
> Though I think by "keyword" he means "reserved word".
>

i mix my maybe again-fail-in-place ( topic ) std

root@localhost:~# alias if='if ' mid='[[ 1 ]] ' mid2='; then ' c1='printf
ye\\n ' end='; fi '
root@localhost:~# if mid mid2 c1 end
ye
root@localhost:~#

Dale
>
>


reply via email to

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