From dad6e9d912d121bc684ecef1d3e419219200728d Mon Sep 17 00:00:00 2001 From: "zi-peng.song" Date: Sun, 23 Oct 2016 21:50:13 +0800 Subject: [PATCH] show vm name and path on command window title. --- Lanayo.VagrantManager/App.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Lanayo.VagrantManager/App.cs b/Lanayo.VagrantManager/App.cs index e509bb4..056db89 100644 --- a/Lanayo.VagrantManager/App.cs +++ b/Lanayo.VagrantManager/App.cs @@ -120,7 +120,7 @@ private void ShowUpdateNotificationPreferenceChanged(Notification notification) public void PerformVagrantAction(string action, VagrantInstance instance) { if (action == "ssh") { - action = String.Format("cd /d {0} && vagrant ssh", Util.EscapeShellArg(instance.Path)); + action = String.Format("cd /d {0} && title {1}--{0} && vagrant ssh", Util.EscapeShellArg(instance.Path), instance.DisplayName); this.RunTerminalCommand(action); } else { this.RunVagrantAction(action, instance); @@ -128,7 +128,7 @@ public void PerformVagrantAction(string action, VagrantInstance instance) { } public void PerformVagrantAction(string action, VagrantMachine machine) { if (action == "ssh") { - action = String.Format("cd /d {0} && vagrant ssh {1}", Util.EscapeShellArg(machine.Instance.Path), machine.Name); + action = String.Format("cd /d {0} && title {1}--{0} && vagrant ssh {1}", Util.EscapeShellArg(machine.Instance.Path), machine.Name); this.RunTerminalCommand(action); } else { this.RunVagrantAction(action, machine);