Would also be great to include a WSLPATH
option in the CLIPBOARD COPYNAMES
object. The REGEXP
feature is great, but a WSL translation is just complicated enough that I don't think that a one line regex can get the job done... I think you need at least two. Then you need the scaffolding to tie them together...
Also, would love to add a quoted
option so that file names would be surrounded by double quotes for pasting into config files, terminals, code, etc... This would be particularly useful in conjunction with the existing single
option...
C:\Users\Leo\CoolFile.txt => /mnt/c/Users/Leo/CoolFile.text
^ prefix /mnt
^ lowercase drive letter
/ / convert backslash to forward slash
You've already got such a complete set of COPYNAMES
options, adding a WSL path seems like it would fit right in.
The most recent Insiders Preview release includes a new wslpath
command that you could use to verify results against.
See: Excerpt.
Build 17046
For general Windows information on build 17046 visit the Windows Blog.
Fixed
WSL
Allow processes to run without an active terminal. [GH 709, 1007, 1511, 2252, 2391, et al.]
Better support of CLONE_VFORK and CLONE_VM. [GH 1878, 2615]
Skip TDI filter drivers for WSL networking operations. [GH 1554]
DrvFs creates NT symlinks when certain conditions are met. [GH 353, 1475, 2602]
The link target must be relative, must not cross any mount points or symlinks, and must exist.
The user must have SE_CREATE_SYMBOLIC_LINK_PRIVILEGE (this normally requires you to launch wsl.exe elevated), unless Developer Mode is turned on.
In all other situations, DrvFs still creates WSL symlinks.
Allow running elevated and non-elevated WSL instances simultaneously.
Support /proc/sys/kernel/yama/ptrace_scope
Add wslpath to do WSL<->Windows path conversions. [GH 522, 1243, 1834, 2327, et al.]
wslpath usage:
-a force result to absolute path format
-u translate from a Windows path to a WSL path (default)
-w translate from a WSL path to a Windows path
-m translate from a WSL path to a Windows path, with ‘/’ instead of ‘\’