Skip to content

Instantly share code, notes, and snippets.

@BtbN
Created Oct 28, 2021
Embed
What would you like to do?
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