Skip to content

Commit

Permalink
Merge pull request #45 from gerardroche/master
Browse files Browse the repository at this point in the history
Allow copy file commands to be called without arguments
  • Loading branch information
braver authored May 22, 2023
2 parents 6246f03 + 5cdf2a3 commit 933d2a4
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions SideBar.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ def is_visible(self, paths=[]):

class SideBarCopyNameCommand(MultipleFilesMixin, SideBarCommand):

def run(self, paths):
def run(self, paths=[]):
names = (os.path.split(path)[1] for path in self.get_paths(paths))
self.copy_to_clipboard_and_inform('\n'.join(names))

Expand All @@ -91,7 +91,7 @@ def description(self):

class SideBarCopyAbsolutePathCommand(MultipleFilesMixin, SideBarCommand):

def run(self, paths):
def run(self, paths=[]):
paths = self.get_paths(paths)
self.copy_to_clipboard_and_inform('\n'.join(paths))

Expand All @@ -101,7 +101,7 @@ def description(self):

class SideBarCopyRelativePathCommand(MultipleFilesMixin, SideBarCommand):

def run(self, paths):
def run(self, paths=[]):
paths = self.get_paths(paths)
root_paths = self.window.folders()
relative_paths = []
Expand Down

0 comments on commit 933d2a4

Please sign in to comment.