Skip to content

Instantly share code, notes, and snippets.

@erickedji
Created March 24, 2009 06:36
Show Gist options
  • Save erickedji/83978 to your computer and use it in GitHub Desktop.
Save erickedji/83978 to your computer and use it in GitHub Desktop.
Cygwin .bashrc goodies
#Copied from http://blog.athulacharya.com/2009/03/cygwin-bashrc-goodness.html
# Open a CMD shell under Cygwin, optionally specifying a working directory
function winsh() {
if [ "x${1}" != "x" ]; then
P=${1}
else
P=.
fi
cmd /c start cmd /k "cd `cygpath -aw ${P}`"
}
# Open a file, as if you double clicked it in windows explorer
function open() {
explorer `cygpath -aw "$1"`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment