Making one (the easy part) ... could be as easy as
Using one (the hard part) ... when an alias starting with "/U" is invoked it should look at the command line and ...
I suspect that that would be easy for files that exist, but require a bit of AI for a file that doesn't exist, for example, an output file for WSL's sort.
Or maybe a special switch (/U again?) ... only meaningful in /U aliases ... meaning use @WSLPATH on the next parameter, perhaps ...
It seems unlikely that a bare "/U" would be needed in a Unix command line. That beats the heck out of typing
Code:
alias grep `/U wsl grep`
Using one (the hard part) ... when an alias starting with "/U" is invoked it should look at the command line and ...
Code:
if it looks like a file name, use @WSLPATH on it
I suspect that that would be easy for files that exist, but require a bit of AI for a file that doesn't exist, for example, an output file for WSL's sort.
Or maybe a special switch (/U again?) ... only meaningful in /U aliases ... meaning use @WSLPATH on the next parameter, perhaps ...
Code:
alias usort `\U wsl sort`
usort /U infile -o /U outfile
It seems unlikely that a bare "/U" would be needed in a Unix command line. That beats the heck out of typing
Code:
usort %@wslpath[infile] -o %@wslpath[outfile].