Suppose you always use CSV files. Then instead of always having to type --csv as in
mlr --csv cut -x -f extra mydata.csv
mlr --csv sort -n id mydata.csv
and so on, you can instead put the following into your $HOME/.mlrrc:
--csv
Then you can just type things like
mlr cut -x -f extra mydata.csv
mlr sort -n id mydata.csv
and the --csv part will automatically be understood. (If you do want to process, say, a JSON file then mlr --json ... at the command line will override the default from your .mlrrc.)
Here is an example .mlrrc file:
# These are my preferred default settings for Miller # Input and output formats are CSV by default (unless otherwise specified # on the mlr command line): csv # If a data line has fewer fields than the header line, instead of erroring # (which is the default), just insert empty values for the missing ones: allow-ragged-csv-input # These are no-ops for CSV, but when I do use JSON output, I want these # pretty-printing options to be used: jvstack jlistwrap # Use "@", rather than "#", for comments within data files: skip-comments-with @