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

     1  # `openagent`
     2  
     3  > Creates a handler function for `open`
     4  
     5  ## Description
     6  
     7  `openagent` creates and destroys handler functions for writing data to the
     8  terminal when accessed via `open` and STDOUT is a TTY.
     9  
    10  ## Usage
    11  
    12  Display code block for an associated data-type:
    13  
    14  ```
    15  openagent get data-type
    16  ```
    17  
    18  Define an `open` handler function:
    19  
    20  ```
    21  openagent set data-type { code-block }
    22  ```
    23  
    24  Undefine an `open` handler:
    25  
    26  ```
    27  !openagent data-type
    28  ```
    29  
    30  ## Detail
    31  
    32  ### FileRef
    33  
    34  It is possible to track which shell script or module installed what `open`
    35  handler by checking `runtime --open-agents` and checking it's **FileRef**.
    36  
    37  ## Synonyms
    38  
    39  * `openagent`
    40  * `!openagent`
    41  
    42  
    43  ## See Also
    44  
    45  * [FileRef](../user-guide/fileref.md):
    46    How to track what code was loaded and from where
    47  * [Modules and Packages](../user-guide/modules.md):
    48    An introduction to Murex modules and packages
    49  * [`fexec` ](../commands/fexec.md):
    50    Execute a command or function, bypassing the usual order of precedence.
    51  * [`open`](../commands/open.md):
    52    Open a file with a preferred handler
    53  * [`runtime`](../commands/runtime.md):
    54    Returns runtime information on the internal state of Murex
    55  
    56  <hr/>
    57  
    58  This document was generated from [builtins/core/open/open_doc.yaml](https://github.com/lmorg/murex/blob/master/builtins/core/open/open_doc.yaml).