From e5c67ecc7c1d7f7dd7df355a60ab61bc12da89b0 Mon Sep 17 00:00:00 2001
From: mintty <mintty@users.noreply.github.com>
Date: Sun, 6 Jan 2019 12:08:25 +0100
Subject: [PATCH] tweak registry key names to avoid collision with existing
keys and enable context menu invocation of default WSL (#141)
---
config-distros.sh | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
diff --git a/config-distros.sh b/config-distros.sh
index ba5ca78..722d000 100755
--- a/config-distros.sh
+++ b/config-distros.sh
@@ -178,17 +178,18 @@ do
# context menu entries
#cmd /C mkcontext "$name"
direckey='HKEY_CURRENT_USER\Software\Classes\Directory'
+ keyname="${name}_Terminal"
if $remove
then
- reg delete "$direckey\\shell\\$name" /f
- reg delete "$direckey\\Background\\shell\\$name" /f
+ reg delete "$direckey\\shell\\$keyname" /f
+ reg delete "$direckey\\Background\\shell\\$keyname" /f
else
- reg add "$direckey\\shell\\$name" /d "$name Terminal" /f
- reg add "$direckey\\shell\\$name" /v Icon /d "$icon" /f
- cmd /C reg add "$direckey\\shell\\$name\\command" /d "\"$target\" -i \"$icon\" --dir \"%1\" $minttyargs $bridgeargs" /f
- reg add "$direckey\\Background\\shell\\$name" /d "$name Terminal" /f
- reg add "$direckey\\Background\\shell\\$name" /v Icon /d "$icon" /f
- cmd /C reg add "$direckey\\Background\\shell\\$name\\command" /d "\"$target\" -i \"$icon\" $minttyargs $bridgeargs" /f
+ reg add "$direckey\\shell\\$keyname" /d "$name Terminal" /f
+ reg add "$direckey\\shell\\$keyname" /v Icon /d "$icon" /f
+ cmd /C reg add "$direckey\\shell\\$keyname\\command" /d "\"$target\" -i \"$icon\" --dir \"%1\" $minttyargs $bridgeargs" /f
+ reg add "$direckey\\Background\\shell\\$keyname" /d "$name Terminal" /f
+ reg add "$direckey\\Background\\shell\\$keyname" /v Icon /d "$icon" /f
+ cmd /C reg add "$direckey\\Background\\shell\\$keyname\\command" /d "\"$target\" -i \"$icon\" $minttyargs $bridgeargs" /f
fi
else
# invocation shortcuts and scripts