Skip to content

Commit 405391e

Browse files
committed
OS independent FmOpenInExplorer label
This commit renames the label of the FmOpenInExplorer command to the default one used by ST: "Open Containing Folder..." This OS independent label doesn't require custom `platform` handling.
1 parent c5a7333 commit 405391e

2 files changed

Lines changed: 2 additions & 19 deletions

File tree

Default.sublime-commands

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,18 +16,8 @@
1616
"command": "fm_delete"
1717
},
1818
{
19-
"caption": "File Manager: Open In Explorer",
19+
"caption": "File Manager: Open Containing Folder…",
2020
"command": "fm_open_in_explorer",
21-
"args": {
22-
"visible_on_platforms": ["windows", "linux"]
23-
}
24-
},
25-
{
26-
"caption": "File Manager: Open In Finder",
27-
"command": "fm_open_in_explorer",
28-
"args": {
29-
"visible_on_platforms": ["osx"]
30-
}
3121
},
3222
{
3323
"caption": "File Manager: Open In Browser",

commands/open_in_explorer.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
# -*- encoding: utf-8 -*-
22
import os
33

4-
import sublime
5-
64
from .fmcommand import FmWindowCommand
75

86

97
class FmOpenInExplorerCommand(FmWindowCommand):
10-
def run(self, visible_on_platforms=None, paths=None):
8+
def run(self, paths=None):
119
# visible_on_platforms is just used by is_visible
1210
for path in paths or [self.window.active_view().file_name()]:
1311
if os.path.isdir(path):
@@ -17,8 +15,3 @@ def run(self, visible_on_platforms=None, paths=None):
1715
self.window.run_command(
1816
"open_dir", {"dir": dirname, "file": basename},
1917
)
20-
21-
def is_visible(self, visible_on_platforms=None, paths=None):
22-
return (
23-
visible_on_platforms is None or sublime.platform() in visible_on_platforms
24-
) and super().is_visible()

0 commit comments

Comments
 (0)