Issue
I am using the terminal in VS code on a Mac to run Python code, and with every command I return whether it results in an error or not, I get the following before my output:
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ...]
I have no idea how this began showing up and no idea how to get rid of it.
Can someone please help point me in the right direction of removing this from my output?
Solution
Found on GitHub, worked flawlessly for me. I didn't even have the -r flag, so I just added -E after sed.
The solution is to edit the file
/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh
on line125
and use the-E
flag instead of -r (since both serve the same purpose - enable use of extended regular expressions - on linux). On Mac -r is not a valid option, hence the issue.(i.e.:)
__vsc_current_command="$(builtin history 1 | sed -E 's/ *[0-9]+ +//')"
Answered By - Amalia Cicala Answer Checked By - Mary Flores (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.