Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get rid of gawk dependency #1

Closed
unlimitedsola opened this issue Jul 25, 2018 · 4 comments
Closed

get rid of gawk dependency #1

unlimitedsola opened this issue Jul 25, 2018 · 4 comments

Comments

@unlimitedsola
Copy link

wslpath is a new tool you can use to convert paths between Windows and Linux. Run wslpath in a WSL environment.

The options are:

-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 ‘\\’
@unlimitedsola
Copy link
Author

Example:

➜  ~ wslpath "C:\Users\loli"
/mnt/c/Users/loli
➜  ~ wslpath "C:\Windows\System32"
/mnt/c/Windows/System32
➜  ~

@unlimitedsola unlimitedsola changed the title use wslpath instead of gawk get rid of gawk dependency Jul 25, 2018
@hangxingliu
Copy link
Owner

but wslpath throw an exception when the parameter is not a path, for example:

git clone [email protected]:hangxingliu/wslgit.git "C:\Projects\wslgit"

and it hard to replace linux path to windows path in stdout of git

@hangxingliu
Copy link
Owner

Similar issue: andy-5/wslgit#12

@unlimitedsola
Copy link
Author

wslpath will give non-zero return code if it failed to transform the input path, maybe we can leverage on this to test against each argument.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants