diff --git a/nethack-launcher.go b/nethack-launcher.go index 234a6fc..25f943b 100644 --- a/nethack-launcher.go +++ b/nethack-launcher.go @@ -198,6 +198,17 @@ func printUserScreen(redisClient *redis.Client, username string) string { exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() clearScreen() printWelcomeScreen(redisClient) + case "e": + hackRCLoc := fmt.Sprintf("%s/user/%s/.nethackrc", config.NethackLauncher.HackDir, username) + exec.Command("stty", "-F", "/dev/tty", "echo", "-cbreak").Run() + clearScreen() + nh := exec.Command("vim", hackRCLoc) + nh.Stdout = os.Stdout + nh.Stdin = os.Stdin + nh.Stderr = os.Stderr + nh.Run() + clearScree() + printUserScreen(redisClient, username) case "w": clearScreen() printProgressScreen(redisClient, username)