Re: return [n] documentation.

2025-02-06 Thread Chet Ramey
On 2/6/25 12:59 PM, Greg Wooledge wrote: If extdebug really does imply functrace, then that's missing from the documentation. The rest appears to be working as intended. Look at item 5. extdebug If set at shell invocation, or in a shell startup file,

Re: return [n] documentation.

2025-02-06 Thread Greg Wooledge
On Thu, Feb 06, 2025 at 14:54:29 -0500, Chet Ramey wrote: > On 2/6/25 12:59 PM, Greg Wooledge wrote: > > > If extdebug really does imply functrace, then that's missing from the > > documentation. The rest appears to be working as intended. > > Look at item 5. > > extdebug >

return [n] documentation.

2025-02-06 Thread Phi
Hi, I find the docco for return [n] not easy to interpret. Here is what can be read. return [n] Stop executing a shell function or sourced file and return the value specified by n to its caller. ... Any command associated wit

Documentation inconsistency (?)

2025-02-06 Thread Alexis Reynouard
Hello, This concern: https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion In the bash documentation, section “shell parameter expansion,” in the paragraph “${parameter:-word},” the example given uses ${parameter-word} which is a Bourne Shell compatible expansion but beh

Re: Documentation inconsistency (?)

2025-02-06 Thread Andreas Kähäri
Je Thu, Feb 06, 2025 at 11:26:08AM +0100, Alexis Reynouard skribis: > Hello, > > This concern: > https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion > > In the bash documentation, section “shell parameter expansion,” in the > paragraph “${parameter:-word},” the example gi

Re: return [n] documentation.

2025-02-06 Thread Greg Wooledge
On Thu, Feb 06, 2025 at 18:41:14 +0100, Phi wrote: > I find the docco for return [n] not easy to interpret. Here is what can be > read. > >return [n] > Stop executing a shell function or sourced file and > return the value specified by n to its caller. >

Re: return [n] documentation.

2025-02-06 Thread Phi Debian
I still don't know the impact (implication) of extdebug, does it impact perf ?

Re: return [n] documentation.

2025-02-06 Thread Phi Debian
It was not obvious from the reading that it would work when trap is inside the function but that is exactly what I need. Again, may be it is just me, but the reading with the back and forth reading and long distance jump in the docco to figure out how it works looks complicated, but that's good en

Re: Documentation inconsistency (?)

2025-02-06 Thread Chet Ramey
On 2/6/25 5:26 AM, Alexis Reynouard wrote: Hello, This concern: https://www.gnu.org/software/bash/manual/bash.html#Shell-Parameter-Expansion In the bash documentation, section “shell parameter expansion,” in the paragraph “${parameter:-word},” the example given uses ${parameter-word} which