github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/variables/argv.md (about)

     1  # `ARGV` (json)
     2  
     3  > Array of the command name and parameters within a given scope
     4  
     5  ## Description
     6  
     7  `ARGV` returns an array of the command name and parameters within a given
     8  scope. eg `function`, `private`, `autocomplete` or shell script.
     9  
    10  Unlike `$PARAMS`, `$ARGV` includes the function name.
    11  
    12  This is a reserved variable so it cannot be changed.
    13  
    14  
    15  
    16  ## Examples
    17  
    18  ```
    19  » function example { $ARGV }
    20  » example abc 1 2 3
    21  [
    22      "example",
    23      "abc",
    24      "1",
    25      "2",
    26      "3"
    27  ]
    28  ```
    29  
    30  ## Detail
    31  
    32  ### Deprecation of `ARGS`
    33  
    34  In Murex versions 4.x and below, this variable was named `ARGS` (with an 'S').
    35  However in Murex 5.x and above it was renamed to `ARGV` (with a 'V') to unify
    36  the name with other languages.
    37  
    38  `ARGS` will remain available for compatibility reasons but is considered
    39  deprecated and may be removed from future releases.
    40  
    41  ## Synonyms
    42  
    43  * `argv`
    44  * `ARGV`
    45  * `ARGS`
    46  
    47  
    48  ## See Also
    49  
    50  * [Array (`@`) Token](../parser/array.md):
    51    Expand values as an array
    52  * [Modules and Packages](../user-guide/modules.md):
    53    An introduction to Murex modules and packages
    54  * [Pipeline](../user-guide/pipeline.md):
    55    Overview of what a "pipeline" is
    56  * [Reserved Variables](../user-guide/reserved-vars.md):
    57    Special variables reserved by Murex
    58  * [Variable and Config Scoping](../user-guide/scoping.md):
    59    How scoping works within Murex
    60  * [`PARAMS` (json)](../variables/params.md):
    61    Array of the parameters within a given scope
    62  * [`autocomplete`](../commands/autocomplete.md):
    63    Set definitions for tab-completion in the command line
    64  * [`function`](../commands/function.md):
    65    Define a function block
    66  * [`json`](../types/json.md):
    67    JavaScript Object Notation (JSON)
    68  * [`out`](../commands/out.md):
    69    Print a string to the STDOUT with a trailing new line character
    70  * [`private`](../commands/private.md):
    71    Define a private function block
    72  * [`set`](../commands/set.md):
    73    Define a local variable and set it's value
    74  * [`string` (stringing)](../types/str.md):
    75    string (primitive)
    76  
    77  <hr/>
    78  
    79  This document was generated from [gen/variables/ARGV_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/variables/ARGV_doc.yaml).