From 90b3f7482a845c98d8cd338823b4542590688fd6 Mon Sep 17 00:00:00 2001 From: Kristinita Date: Thu, 10 Nov 2016 20:42:10 +0300 Subject: [PATCH 1/2] Fix space in path name bug --- ConEmuOpen.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/ConEmuOpen.py b/ConEmuOpen.py index b4ea32b..eb44ff1 100644 --- a/ConEmuOpen.py +++ b/ConEmuOpen.py @@ -19,43 +19,43 @@ def get_project(self): return (project_name, project_dir, has_project) def open_conemu(self, dirname, title): - command= "start conemu.exe /Single /Dir "+dirname+" /cmdlist cmd -new_console:t:\""+title+"\"" + command= "start conemu.exe /Single /Dir \""+dirname+"\" /cmdlist cmd -new_console:t:\""+title+"\"" os.system(command) - + # open project folder class OpenConemuProjectCommand(sublime_plugin.WindowCommand, ConEmuOpenCommand): def run(self): project_name, project_dir, has_project = self.get_project() if not project_name: return - + self.open_conemu(project_dir, project_name) - + # open "here" folder class OpenConemuHereCommand(sublime_plugin.WindowCommand, ConEmuOpenCommand): def run(self, paths=[]): project_name, project_dir, has_project = self.get_project() if not project_name: return - + if paths: heredir = paths[0] if os.path.isfile(heredir): heredir = os.path.dirname(heredir) - elif self.window.active_view().file_name(): + elif self.window.active_view().file_name(): heredir = os.path.dirname(self.window.active_view().file_name()) else: # if no active file open, then try to open project folder heredir = project_dir - + # get the tab title title = heredir - if has_project: + if has_project: rel_path = os.path.relpath(heredir, project_dir) if rel_path == '.': title = project_name elif rel_path[:2] == '..': # not in project, show the whole path title = heredir - else: + else: title = project_name + ': ' + rel_path - + self.open_conemu(heredir, title) \ No newline at end of file From a1773936a7dac91092526606a375f13f5ba952bd Mon Sep 17 00:00:00 2001 From: Kristinita Date: Thu, 10 Nov 2016 20:51:28 +0300 Subject: [PATCH 2/2] Change cmd to powershell --- ConEmuOpen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ConEmuOpen.py b/ConEmuOpen.py index eb44ff1..3a6031e 100644 --- a/ConEmuOpen.py +++ b/ConEmuOpen.py @@ -19,7 +19,7 @@ def get_project(self): return (project_name, project_dir, has_project) def open_conemu(self, dirname, title): - command= "start conemu.exe /Single /Dir \""+dirname+"\" /cmdlist cmd -new_console:t:\""+title+"\"" + command= "start conemu.exe /Single /Dir \""+dirname+"\" /cmdlist powershell -new_console:t:\""+title+"\"" os.system(command) # open project folder