visidata
visidata copied to clipboard
Docs:How do I replay cmdlogs on arbitrary files?
According to https://github.com/saulpw/visidata/issues/572 this has been implemented, but from the comments on the issue I can't figure out how to do it, and I can't find any documentation.
I recorded some actions an Visidata wrote me a cmdlog file whose first few lines look like this:
#!vd -p
{"col": "", "row": "", "longname": "open-file", "input": "/home/isme/tmp/stack_instances.json", "keystrokes": "o"}
{"sheet": "stack_instances", "col": "", "row": "0", "longname": "open-row", "input": "", "keystrokes": "Enter", "comment": "open current row with sheet-specific dive"}
{"sheet": "stack_instances[]", "col": "", "row": "\u30adSummaries", "longname": "open-row", "input": "", "keystrokes": "Enter", "comment": "open current row with sheet-specific dive"}
{"sheet": "stack_instances[]_Summaries", "col": "StackSetId", "row": "", "longname": "hide-col", "input": "", "keystrokes": "-", "comment": "Hide current column"}
It works only on the file names in the "open-file" command. I want it to work on any file with the same schema. I want to specify the file name at the command line.
I tried removing the "open-file" line and passing the -o
option, but that produces no output at all.
vd -o ~/tmp/stack_instances.json -p stack_instance_status_summary_histogram.vdj
The other issue talks about replacing a sheet name with null or 0, but I don't know what that means. In my example the sheet name is not always the same because some of the commands create new sheets.