[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Request change to output of declare -f funcname
From: |
Andreas Kusalananda Kähäri |
Subject: |
Re: Request change to output of declare -f funcname |
Date: |
Sat, 2 Oct 2021 15:46:41 +0200 |
On Sat, Oct 02, 2021 at 09:09:39AM -0400, Greg Wooledge wrote:
> On Sat, Oct 02, 2021 at 01:41:35PM +0200, Léa Gris wrote:
> > $ declare -f hello
> >
> > hello ()
> > {
> > echo 'hello';
> > echo 'world'
> > }
> >
> > The issue is that in some circumstances, newline characters may be handled
> > as space, making the function declaration invalid.
>
> Can you show an example where the output of declare -f is invalid?
I don't think their issue is that the output from declare -f is ever
invalid as such, but that their usage of the resulting text involves
replacing newlines with spaces, which turns it into invalid shell code.
--
Andreas (Kusalananda) Kähäri
SciLifeLab, NBIS, ICM
Uppsala University, Sweden
.
Re: Request change to output of declare -f funcname,
Andreas Kusalananda Kähäri <=