You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Cmder has this feature, though I can not tell you how they implemented it. If you are in a bash shell on Windows, Windows paths will be automatically converted to Unix-like paths when they are pasted. This is very useful!
Eg. pasting C:\Windows\System32 would be turned into /c/Windows/System32 when pasted under a Git for Windows Bash, but turned into /cygdrive/c/Windows/System32 when pasted under a Cygwin bash shell.
The text was updated successfully, but these errors were encountered:
NiklasRosenstein
changed the title
Automatically convert paths on paste into bash on WIndows
[Windows] Automatically convert paths when pasted into bash
Jun 22, 2018
At some point in the future I would like to add some kind of Special Paste command which allowed for editing or transforming text before it is pasted. Converting paths would fit into that. I don't have that yet, but what you could try is adding a special command to convert any path in the clipboard and then 'type' it into the terminal.
Extraterm has a little baby extension/plugin system and the extensions live under the extensions directory on github. The InjectShellIntegration extension demonstrates most of what you want. It can insert text into the terminal and also add commands to the command palette. WindowsConsoleSessionEditor has a package.json file with the stuff needed to only allow that extension to load on Windows. What is missing is the ability to grab the contents of the clipboard. I would have to add that to the extension API. Also, the recent update to WSL added a small tool (wslpath.exe I think) which makes it possible to translate paths.
Cmder has this feature, though I can not tell you how they implemented it. If you are in a bash shell on Windows, Windows paths will be automatically converted to Unix-like paths when they are pasted. This is very useful!
Eg. pasting
C:\Windows\System32
would be turned into/c/Windows/System32
when pasted under a Git for Windows Bash, but turned into/cygdrive/c/Windows/System32
when pasted under a Cygwin bash shell.The text was updated successfully, but these errors were encountered: