Quantcast
Channel: Take Command / TCC
Viewing all articles
Browse latest Browse all 1743

@LXPATH

$
0
0
I'm playing with this (improvements welcomed).

Code:
v:\> function lxpath `'%@rereplace["([a-zA-Z]):",/mnt/%%@lower[\1],%@rereplace[\\,/,%$]]'`

It works like this.

Code:
v:\> echo %@lxpath[D:\WoRk\AbC\DeF\FoO.TxT]
'/mnt/d/WoRk/AbC/DeF/FoO.TxT'

Apparently (I'd like to know more about this) file names and directory names inside /mnt/<windows_drive_letter> are case-insensitive (not the drive letter itself). So these work.

Code:
v:\> type d:\work\abc\def\foo.txt
foo

v:\> wsl cat...

Read more

Viewing all articles
Browse latest Browse all 1743

Trending Articles