Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
eliranwong committed Nov 1, 2023
1 parent a914ef2 commit 60f1e78
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions util/LocalCliHandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -4276,13 +4276,13 @@ def confirmSaveTextFile(self, text):

# pipe text content into a cli tool
def cliTool(self, tool="", content=""):
if not tool:
command = re.sub(" .*?$", "", tool.strip())
if not command:
self.multilineEditor(content)
elif tool and WebtopUtil.isPackageInstalled(tool):
elif command and WebtopUtil.isPackageInstalled(command):
pydoc.pipepager(content, cmd=tool)
if WebtopUtil.isPackageInstalled("pkill"):
tool = tool.strip().split(" ")[0]
os.system(f"pkill {tool}")
os.system(f"pkill {command}")
return ""

def openNoteEditor(self, noteType, b=None, c=None, v=None, year=None, month=None, day=None, editor=""):
Expand Down

0 comments on commit 60f1e78

Please sign in to comment.