help-bash
[Top][All Lists]
Advanced

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

Re: What is the purpose of BASH_ARGV0?


From: Chet Ramey
Subject: Re: What is the purpose of BASH_ARGV0?
Date: Mon, 1 Jun 2026 15:16:11 -0400
User-agent: Mozilla Thunderbird

On 5/31/26 10:53 AM, Stan Marsh wrote:

Also, somewhat related - and related to another recent thread on one of these 
bash-*
lists, why is BASH_ARGV (without the 0) only maintained when extdebug is set?  
This
boils down to two questions:

     1) Is there any real cost to turning extdebug on?  Any reason for me to 
not just
have it on all the time?

That's up to you and your use cases.

     2) Is there any real cost to maintaining BASH_ARGV regardless of extdebug?

Yes, there is a small but real cost that increases as the number of
arguments increases. See, for instance,

https://lists.gnu.org/archive/html/bug-bash/2018-02/msg00024.html

and my reply.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    chet@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

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