bashdb evaluates escape codes when it's printing the current line of source code
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Tech stack
- bash
- Domain
- devtools
Research direction
Reproduce the example script and trace where bashdb prints the current source line, checking lib/hooks.sh as suggested in the issue. The fix is complete when escape sequences in a line such as RED=$'\x1b[31m' are displayed unchanged rather than evaluated.
Written by the indexing model from the issue text.
Description
Debugging the snippet yields this (in red color):
(/home/jansorg/test.bash:2):
2: RED=$''
bashdb<0>
But it should have printed the source line unchanged, i.e. as RED=$'\x1b[31m'.
I tried to fix this, but couldn't find the place where the source line is printed (in lib/hooks.sh?).
If you pointed me to the right source, I'd try again to fix this.
#!/bin/bash
RED=$'\x1b[31m'
RESET=$'\x1b[0m'
read -e -p "Please enter a name: " -r NAME
echo "The name is $RED$NAME$RESET!"
- Dominant language
- Shell
- Stars
- 98
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Getting set up
We have not checked this project's setup files yet. Start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Trepan-Debuggers/bashdb
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
Trepan-Debuggers/bashdb#71 ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Trepan-Debuggers/bashdb#63 · 4 comments ·
All issues in Trepan-Debuggers/bashdb
Similar issues
-
bot-found bug priority: P3
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
madenvel/KalinkaPlayer#179 ·
-
documentation
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
jbaruch/coding-policy#621 ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100
mattpocock/skills#1134 ·
-
area:build bug P3
Difficulty 1/5 Under an hour Newbie friendliness 92/100
uttrflow/uttrflow-swift#2506 ·
Maintainers usually reply within 1 day