Skip to content

Commit

Permalink
[macros-] save file as longname/keystroke #2084
Browse files Browse the repository at this point in the history
  • Loading branch information
saulpw committed Oct 26, 2023
1 parent 7406f04 commit 9d779d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion visidata/cmdlog.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def checkVersion(vd, desired_version):
vd.fail("version %s required" % desired_version)

@VisiData.api
def fnSuffix(vd, prefix):
def fnSuffix(vd, prefix:str):
i = 0
fn = prefix + '.vdj'
while Path(fn).exists():
Expand Down
2 changes: 1 addition & 1 deletion visidata/macros.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ def setMacro(ks, vs):
def saveMacro(self, rows, ks):
vs = copy(self)
vs.rows = rows
macropath = Path(vd.fnSuffix(vd.options.visidata_dir+"macro"))
macropath = Path(vd.fnSuffix(str(Path(vd.options.visidata_dir)/ks)))
vd.save_vdj(macropath, vs)
setMacro(ks, vs)
vd.macrosheet.source.append_tsv_row((ks, macropath))
Expand Down

0 comments on commit 9d779d6

Please sign in to comment.