Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laurent22/wslpath
wslpath - Converts Unix and Windows format paths in WSL
https://github.com/laurent22/wslpath
path php wsl
Last synced: 12 days ago
JSON representation
wslpath - Converts Unix and Windows format paths in WSL
- Host: GitHub
- URL: https://github.com/laurent22/wslpath
- Owner: laurent22
- License: mit
- Created: 2017-08-24T09:11:38.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-04-27T10:38:02.000Z (over 6 years ago)
- Last Synced: 2024-08-13T07:04:39.555Z (3 months ago)
- Topics: path, php, wsl
- Language: PHP
- Homepage:
- Size: 6.84 KB
- Stars: 105
- Watchers: 7
- Forks: 9
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - laurent22/wslpath - wslpath - Converts Unix and Windows format paths in WSL (PHP)
README
# wslpath
wslpath - Converts Unix and Windows format paths in WSL Edit
# Installation
Note: PHP is required.
wget 'https://raw.githubusercontent.com/laurent22/wslpath/master/wslpath'
chmod 755 wslpath
sudo mv wslpath /usr/bin# Usage
wslpath [-m|-u|-w|-h] NAME[:line[:col]]
Output type options:
-w (default) prints Windows form of NAME (C:\WINNT)
-m like -w, but with regular slashes (C:/WINNT)
-u prints Unix form of NAME (/mnt/c/winnt)Other options:
-h displays usage information
If no output type is selected, the program will try to detect the form of
NAME and print the opposite type (eg. will print Windows form for Unix
path).# Features
- Auto-detects path - converts to a Unix path if it is a Windows path and vice-versa.
- Correctly handles symlinks (Since Windows does not know about the WSL symlinks, they are resolved and the link target is returned).
- Correctly handles paths under lxss directory (this is the hidden user directory under which WSL-only files and directories are located).
- Correctly handles :line:column suffix. For example, `subl $(wslpath /mnt/d/script.js:10:2)` would open D:\script.js at line 10, column 2 in Sublime Text# License
MIT