@WSLPATH ... @TRUENAME

May 20, 2008
10,511
77
Syracuse, NY, USA
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"
 
May 20, 2008
10,511
77
Syracuse, NY, USA
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.
 
Thread starter Similar threads Forum Replies Date
V Suggestions 3