Skip to content

Commit 3df2411

Browse files
committed
Escape % in bash shell integration
Part of microsoft#157226
1 parent b87da57 commit 3df2411

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/vs/workbench/contrib/terminal/browser/media/shellIntegration-bash.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ __vsc_update_cwd() {
5959

6060
__vsc_command_output_start() {
6161
builtin printf "\033]633;C\007"
62-
builtin printf "\033]633;E;$__vsc_current_command\007"
62+
# Send command line, escaping printf format chars %
63+
builtin printf "\033]633;E;$(echo $__vsc_current_command | sed s/%/%%/g)\007"
6364
}
6465

6566
__vsc_continuation_start() {

0 commit comments

Comments
 (0)