Problem description
In the Mac environment, the terminal that comes with Vscode will show a sed prompt no matter what command it is.,There is no problem with using the built-in terminal
$ echo 'hi'
sed: illegal option -- r
usage: sed script [-Ealn] [-i extension] [file ...]
sed [-Ealn] [-i extension] [-e script] ... [-f script_file] ... [file ... ]
hi
System Environment
# system version
$sw_vers
ProductName: Mac OS X
ProductVersion: 10.14.4
BuildVersion: 18E2035
# vscode version
$ code -v
1.71.0
784b0177c56c607789f9638da7b6bf3230d47a8c
x64
Solution
Refer to the issue for a good solution to this problem
The official website also said that this problem will be fixed in the next version
Modify file /Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh
Replace line 125
# __vsc_current_command="$(builtin history 1 | sed -r 's/ *[0 -9]+ +//')"
__vsc_current_command="$(builtin history 1 | sed -E 's/ *[0-9]+ +//')"
Read More:
- VSCode Terminal Execute tsc Commands Error [Solved]
- VScode integrate terminal input node error [How to Solve]
- How to Solve Vscode terminal error (ts -v)
- .sh error: ***.sh: 2: set: Illegal option – Solution
- [Solved] tsc execute error in VSCode Terminal
- Vscode configures eslint to solve terminal syntax error
- [Solved] VScode Error: PS D:\vscode> cd “d:\vscode\“ ; if ($?) { g++ tempCodeRunnerFile.cpp -o tempCodeRunn
- [Solved] Vscode error: Unable to resolve resource walkThrough://vscode_getting_started_page
- [Solved] R Language Error: Error in RStudioGD() : Shadow graphics device error: r error 4 (R code execution error)
- [Solved] jetson nano Error: Illegal instruction(core dumped)
- [Solved] Illegal access: this web application instance has been stopped already
- Error: (1, 1) java: Illegal character:’\ufeff’ [How to Solve]
- [Solved] std::max() error C2589: ‘(‘ : illegal token on right side of ‘::‘
- [Solved] Springboot WARNING: All illegal access operations will be denied in a future release
- [Solved] VScode Error: find_package(catkin) failed
- vscode git error: would clobber existing tag [How to Solve]
- How to Solve ES error: “illegal_argument_exception”
- TensorRT model quantization error: Error Code 1: Cuda Runtime (an illegal memory access was encountered)
- GCC error: unrecognized command line option ‘-no-pie’
- Implement base64_decode in GO language to solve the problem of illegal characters