Skip to content

Instantly share code, notes, and snippets.

View MathiasBaumgartinger's full-sized avatar

Mathias Baumgartinger MathiasBaumgartinger

View GitHub Profile
@MathiasBaumgartinger
MathiasBaumgartinger / open.py
Last active September 8, 2022 05:28
WSL python script for easy opening of files and directories
#!/usr/bin/env python3
"""
Add this script to a global directory (e.g. /usr/local/bin) in your WSL
without the ``.py`` extension.
This script will automatically open any file/directory with it's default
Windows Application. Directories will be opened with Windows' file
explorer.
Usage: open <(dir/file)>