Skip to content

Latest commit

 

History

History
75 lines (51 loc) · 2.07 KB

README.md

File metadata and controls

75 lines (51 loc) · 2.07 KB

nufmt: the nushell formatter

MIT licensed Discord chat CI on main nushell version

Table of contents

Status

This project is still very much in beta. Expect bugs, unconsistent behaviour. Do not use in productive nushell scripts!

Some of the outputs deletes comments, break the functionality of the script or doesn't format at all.

To use the formatter, test it first and use it with caution!.

Usage

If you still want to use it, or test it to contribute, this is the --help.

nufmt [OPTIONS] [FILES] ...

Files

Files are a list of files. It cannot be used combined with --stdin. You can format many files with one command!. For example:

nufmt my-file1.nu my-file2.nu my-file3.nu

Options

  • -s or --stdin formats from stdin, returns to stdout as a String. It cannot be used combined with files.

  • -c or --config pass the config file path. Sample:

    nufmt <files> --config my-config.json
    

    or

    nufmt --stdin <string> --config my-stdin-config.json
    
  • -h or --help show help and exit

  • -v or --version prints the version and exit

Contributing

We have a contribution guide. If you still have doubts, you can mention @AucaCoyan who is active on this repo.