We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent cc81204 commit 9f0d969Copy full SHA for 9f0d969
openbash/__init__.py
@@ -1,6 +1,13 @@
1
-from fman import DirectoryPaneCommand
2
import subprocess
+from fman import DirectoryPaneCommand
3
+from fman.url import splitscheme, as_human_readable
4
5
class OpenBash(DirectoryPaneCommand):
6
def __call__(self):
- subprocess.call('C:/Program Files/Git/git-bash.exe --cd="{cd}"'.format(cd=self.pane.get_path()))
7
+ url = self.pane.get_path()
8
+ scheme, path = splitscheme(url)
9
+ if scheme != 'file://':
10
+ show_alert('Not supported.')
11
+ return
12
+ local_path = as_human_readable(url)
13
+ subprocess.call('C:/Program Files/Git/git-bash.exe --cd="{cd}"'.format(cd=local_path))
0 commit comments