Created
October 28, 2021 18:24
-
-
Save BtbN/93e1070d249fc0bb1b50e6936a763fa5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
function npp() { | |
args=() | |
for v in "$@"; do | |
if [[ "$v" == /mnt/?/* ]]; then | |
args+=( "${v:5:1}:${v:6}" ) | |
else | |
args+=( "$v" ) | |
fi | |
done | |
test -z "${args[*]}" && return | |
powershell.exe -Command '& {Start-Process -FilePath "C:/Program Files/Notepad++/notepad++.exe" -ArgumentList $args}' "${args[@]}" | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment