Welcome!

By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

Done @WSLPATH ... @TRUENAME

May
12,846
164
Could @WSLPATH be made to automatically use @TRUENAME? I use several SUBST'd drive letters and they don't show up in /mnt/.

Code:
v:\> type json.json
{"created_at":"2019-09-06T15:51:10Z","id":19814066,"tag":"v0.9b11"}

v:\> wsl jq ".tag" %@wslpath[json.json]
jq: error: Could not open file //mnt/v/json.json: No such file or directory

v:\> wsl jq ".tag" %@wslpath[%@truename[json.json]]
"v0.9b11"
 
There are ways around this. For example, when I'm at a command prompt, I'm usually here.

Code:
v:\> subst | grep V
V:\: => D:\work

And WSL can't find the likes of this.

Code:
v:\> echo %@wslpath[savedcommands.txt]
//mnt/v/savedcommands.txt

In WSL (Ubuntu) I did this.

Code:
sudo ln -s /mnt/d/work /mnt/v

It works as if v were automatically mounted.
 
Back
Top