Collect selected cli args and pass them to sub-invocations of bashrc#72
Collect selected cli args and pass them to sub-invocations of bashrc#72hawicz wants to merge 1 commit into
Conversation
…through the "debug" command. Fixes Issue Trepan-Debuggers#71
|
@hawicz Thanks for doing this. I'll look at this in detail a little later. |
| _Dbg_tty:--tty= | ||
| _Dbg_tty_in:--tty_in= | ||
| _Dbg_tmpdir:--tempdir= | ||
| _Dbg_set_linetrace:--trace |
There was a problem hiding this comment.
I needed to add:
_Dbg_libdir:-L=
because, my initial bash invocation was:
/tmp/bashdb/bashdb -L /tmp/bashdb --tty /dev/tty --tty_in /dev/tty /tmp/somescript
Here is what I got initially without the above change (following the issue instructions):
$ git checkout HEAD
bash debugger, bashdb, release 5.2-1.2.0
Copyright 2002-2004, 2006-2012, 2014, 2016-2019, 2021, 2023-2024 Rocky Bernstein
This is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
/tmp/bashdb/init/opts.sh: line 294: ((: /tmp/bashdb: syntax error: operand expected (error token is "/tmp/bashdb")
(/tmp/somescript:1):
1: /tmp/otherscript
bashdb<0>
bashdb: That's all, folks...
|
It all looks good, but I think there is one more bashdb variable that needs to get passed through ( The thing I'd ask though, is to work up some test for this. It could either be a unit test using shunit (in |
|
Hmm... I thought there already was special handling for the -L option, and I didn't want to duplicate what that was doing. I'll take a other look |
Followed by the steps from #71, except I changed the bashdb command to:
I also tried using the uninstalled script from /tmp/bashdb with but with the same working result. I'm using bash 5.2.37. the relevant lines in opts.sh are: So I don't understand how you could have seen that error on line 294. |
One can get this behavior if you have bashdb installed in the place that bash thinks bashdb should be installed by default. (This might be "/usr/share/bashdb/bashdb-main.inc") Make sure you do not have bashdb installed before running this test. |
…through the "debug" command. Fixes Issue #71