Open pfitzseb opened 1 year ago
Good idea 👍. I guess we would also want to consider whether \
or /
is preferred and special path mappings like in git bash which would transform c:\Users
to /c/Users
cc @zadjii-msft
I think 633 P
is the right sequence here as well since it was intended to set "properties" on the terminal which are a set one time, as opposed to the others which are very common.
Ha, yes, this just came up in a review I was doing too. link.
cmd
is another interesting example, because changing to another drive requires cd /d {path}
.
If you do end up doing something like this with a custom property, we can try and follow suite. I'm pretty sure there's an edge case somewhere out there where one shell will accept paths wrapped in single-quotes, and others in double quotes.
I'm also personally not planning on sending the \r
at the end of any commands we synthesize from history. So, if we do end up with cd c:\foo
on the commandline, someone can go back and edit it first.
I'm also personally not planning on sending the \r at the end of any commands we synthesize from history. So, if we do end up with cd c:\foo on the commandline, someone can go back and edit it first.
@zadjii-msft we have a pattern where we don't send the \r if you hold alt fyi:
Oh that's neat, I'll have to keep that in mind
The shell integration feature can be used by arbitrary REPL-like programs. This includes
cwd
detection. Unfortunately, the current implementation ofworkbench.action.terminal.goToRecentDirectory
can't handle that gracefully, since it seems to always send something likecd $dir\n
to the terminal.This is the status quo in Julia (switching to shell mode makes the command work, but is cumbersome):
It would be awesome if REPL-likes could register a template string at startup, which VS Code would then send instead of
cd $dir
. E.g.