Hi all!

Short question concerning BASH_ARG[CV] and function execution. According to the
info manual and man pages, the arguments of functions should be pushed onto the
named arrays. But this doesn't happen currently, only for the source built-in.
I tracked the problem down to the lines around 3212 and 3264 in
execute_function() in execute_cmd.c:

  /* Update BASH_ARGV and BASH_ARGC */
  if (debugging_mode)
    push_args (words->next);

[...]

  /* Restore BASH_ARGC and BASH_ARGV */
  if (debugging_mode)
    pop_args ();

The debugging_mode check should be removed, or the info manual and man
pages need to be adjusted to represent the current behaviour.

Cheers,
Sven

-- 
Sven Wegener
Gentoo Developer
http://www.gentoo.org/

Attachment: pgphDUh9LYOnK.pgp
Description: PGP signature

_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to