Docs
@parameters
- The
@parameters
syntax instructs Nota what values to pass to your script and in what order. The script receives them as arguments. Accessing them is dependent on the programming language you are using. For example, in Bash, it will be$1
,$2
, etc., and in JavaScript, it will beprocess.argv[2]
,process.argv[3]
, etc. @parameters
should be placed inside a comment that doesn't include anything else.- When passing multiple arguments, you should separate them with spaces (e.g.
@parameters file workspace
). - All extensions support the
file
(the path to the currently opened file) and theworkspace
(the path to the currently opened workspace) parameters. Additionally, each type of extension may have additional parameters.
Bash example:
#!/bin/bash
# @parameters file workspace
JavaScript example:
#!/usr/bin/env node
// @parameters file workspace