Skip to content

Commit

Permalink
Fix step+ and step- commands in bashdb. Before, step+ and step- were …
Browse files Browse the repository at this point in the history
…registered as seperate commands and not as aliases. Also, the suffix matching wasn't working in _Dbg_do_step for suffix values - and +.
  • Loading branch information
jansorg committed Jun 17, 2024
1 parent 4204dd4 commit 63fe026
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions command/step.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,15 @@ _Dbg_help_add 'step+' \
In contrast to \"step\", we ensure that the file and line position is
different from the last one just stopped at.
See also \"step-\" and \"set force\"."
See also \"step-\" and \"set force\"." 0

_Dbg_help_add 'step-' \
"step- -- Single step a statement without the \`step force' setting.
Set step force may have been set on. step- ensures we turn that off for
this command.
See also \"step\" and \"set force\"."
See also \"step\" and \"set force\"." 0

# Step command
# $1 is command step+, step-, or step
Expand All @@ -68,7 +68,7 @@ _Dbg_do_step() {
typeset suffix
suffix=${_Dbg_last_next_step_cmd:${#_Dbg_last_step_next_cmd}-1:1}

case "suffix" in
case "$suffix" in
'+' ) _Dbg_step_force=1 ;;
'-' ) _Dbg_step_force=0 ;;
* ) _Dbg_step_force=$_Dbg_set_different ;;
Expand Down
2 changes: 1 addition & 1 deletion lib/processor.sh
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ _Dbg_onecmd() {

# single-step
'step+' | 'step-' )
_Dbg_do_step "$_Dbg_cmd" $_Dbg_args
_Dbg_do_step $_Dbg_args
return 0
;;

Expand Down

0 comments on commit 63fe026

Please sign in to comment.