Menu

Spoiling BASH variables

2023-01-05
2023-01-05
  • Lothar Langer

    Lothar Langer - 2023-01-05

    Is it necessary for bashdb to use identifiers without '_Dbg...' for variables (e.g. the variable 'args' in complete.sh among others)? The use of these identifiers seem to kind of spoil variables with the same name in the debugged bash file. I.e. if I then do 'x args' in a debug session I never get a correct response from bashdb.

    Also I never get correct responses for 'x $#' as opposed to 'x $@'. Why?
    -Lothar

     
  • Rocky Bernstein

    Rocky Bernstein - 2023-01-05

    Is it necessary for bashdb to use identifiers without '_Dbg...' for variables (e.g. the variable 'args' in complete.sh among others)?

    Never ascribe to maliciousness that which can easily be explained by oversight. Adding _Dbg_ was done pretty late in the game, and the entire code base has not been gone over thoroughly.

    In commit 890536b I have converted the variable you mention and maybe a couple of other cases as well.

    Also I never get correct responses for 'x $#' as opposed to 'x $@'. Why?

    I guess someone needs to investigate this, if it is desired to be corrected. Hey, how about you?

    There was a time way way back in the open-source world when if someone noticed a problem the person would investigate the problem and send a patch to fix it.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.