Skip to content

Instantly share code, notes, and snippets.

@garsue
Created October 6, 2014 01:26
Show Gist options
  • Save garsue/452d4c97da106f79c4ea to your computer and use it in GitHub Desktop.
Save garsue/452d4c97da106f79c4ea to your computer and use it in GitHub Desktop.
open command for mingw shell
#!/bin/sh
start `pth-norm $@`
#!/usr/bin/env python
# vim: fileencoding=utf-8
import sys
from os.path import normcase, expanduser
def main(path):
split_list = normcase(path).split('\\')
split_list[0] = normcase(expanduser(split_list[0]))
norm = '\\'.join(split_list)
print(norm)
if __name__ == '__main__':
if len(sys.argv) < 2:
print("Take more than 1 argument")
exit(1)
main(sys.argv[1])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment