Last active
June 13, 2016 06:43
-
-
Save tohagan/d2e50a6c47f9fe8b2a2d6ceab1ad0ba7 to your computer and use it in GitHub Desktop.
Usage wcd "<windows path>" - Copy paste a paths from Explorer into Windows bash to cd to that folder.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Add to your ~/.profile or ~/.bashrc file ... | |
# Use in Windows bash to cd to a Windows directory path containing backslashes. | |
wcdfn() { | |
if [ -z "$1" ] | |
then | |
echo "wcd <windows-path>" 2>&1; | |
else | |
#cd `echo "/$1" | sed -e 's,\\\\,/,g' -e 's/://' ` | |
cd `cygpath -u "$1"` | |
fi | |
} | |
alias wcd=wcdfn |
Author
tohagan
commented
Apr 29, 2016
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment