2 Mention why 0=... wouldn't work (thanks ilkkachu).
source | link

The changelog says

    - BASH_ARGV0: new dynamic variable, returns $0 on reference and sets
      $0 on assignment.  From a suggestion from  Rocky Bernstein <rocky@gnu.org>
      a few years ago

Rocky Bernstein is, among other things, the initial author of the BASH Debugger. When debugging, it can be useful to be able to set $0 to different values; this led to this suggestion, ten years ago, of a set0 built-in which would allow just that. I think BASH_ARGV0 is the equivalent in the form of a special variable rather than a built-in.

$0 only allows you to read the value; before Bash 5, it could only be set when starting the shell. BASH_ARGV0 allows you to write the value as well as read it. 0 isn’t a valid variable name for assignment purposes, and enabling 0=... would have been rather more complex.

The changelog says

    - BASH_ARGV0: new dynamic variable, returns $0 on reference and sets
      $0 on assignment.  From a suggestion from  Rocky Bernstein <rocky@gnu.org>
      a few years ago

Rocky Bernstein is, among other things, the initial author of the BASH Debugger. When debugging, it can be useful to be able to set $0 to different values; this led to this suggestion, ten years ago, of a set0 built-in which would allow just that. I think BASH_ARGV0 is the equivalent in the form of a special variable rather than a built-in.

$0 only allows you to read the value; before Bash 5, it could only be set when starting the shell. BASH_ARGV0 allows you to write the value as well as read it.

The changelog says

    - BASH_ARGV0: new dynamic variable, returns $0 on reference and sets
      $0 on assignment.  From a suggestion from  Rocky Bernstein <rocky@gnu.org>
      a few years ago

Rocky Bernstein is, among other things, the initial author of the BASH Debugger. When debugging, it can be useful to be able to set $0 to different values; this led to this suggestion, ten years ago, of a set0 built-in which would allow just that. I think BASH_ARGV0 is the equivalent in the form of a special variable rather than a built-in.

$0 only allows you to read the value; before Bash 5, it could only be set when starting the shell. BASH_ARGV0 allows you to write the value as well as read it. 0 isn’t a valid variable name for assignment purposes, and enabling 0=... would have been rather more complex.

1
source | link

The changelog says

    - BASH_ARGV0: new dynamic variable, returns $0 on reference and sets
      $0 on assignment.  From a suggestion from  Rocky Bernstein <rocky@gnu.org>
      a few years ago

Rocky Bernstein is, among other things, the initial author of the BASH Debugger. When debugging, it can be useful to be able to set $0 to different values; this led to this suggestion, ten years ago, of a set0 built-in which would allow just that. I think BASH_ARGV0 is the equivalent in the form of a special variable rather than a built-in.

$0 only allows you to read the value; before Bash 5, it could only be set when starting the shell. BASH_ARGV0 allows you to write the value as well as read it.