Recently, Saul has pushed a re-work of the CLI options to the
develop branch. I am particularly excited about this change, and so I wanted to cover it in detail.
I am going to be referencing two options;
-f, alias for
-d, alias for
By default, VisiData deduces the filetype of a source from its extension.
-f allows you to manually declare the filetype, overriding deduction by extension.
-d sets the delimiter for TSV files.
vd --helpwill now open the manpage
vd -f json foo.json.gznow applies to the inner filetype.
Historically, if you did,
vd -f csv foo.tsv bar.csv
-f would then get applied as a global option to every source. There was no way to communicate to VisiData distinct filetypes for each source.
With the new additions, you can do this,
vd -f tsv foo.tsv -f csv bar.csv
-f tsv would be applied to foo.tsv, and
-f csv would be applied to bar.csv.
--options will apply as sheet-specific options to the sources which follow them.
-git will be set globally for all sheets in the session, just like in the previous versions of VisiData. Some special options, like
-p(replay), are always going to be global, and will not require the
To specify a different delimiter for each file,
vd -d '|' pipes.tsv -d ',' commas.tsv
To set a global delimiter,
vd pipes.tsv commas.tsv -g -d '|' vd -g -d '|' pipes.tsv commas.tsv
To specify a filetype for all of the files provided through the CLI,
vd foo bar -f tsv
As always, please let us know how you feel about it! Share a tweet, or stop by for a chat in freenode #visidata.
[written by Anja Boskovic 2020-07-07][updated by Anja Boskovic 2020-07-26]