github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/escape/escape_doc.yaml (about)

     1  - DocumentID: escape
     2    Title: >+
     3      `escape`
     4    CategoryID: commands
     5    Summary: >-
     6      Escape or unescape input
     7    Description: |-
     8      `escape` takes input from either STDIN or the parameters and returns the same
     9      data, escaped.
    10  
    11      `!escape` does the same process in reverse, where it takes escaped data and
    12      returns its unescaped counterpart.
    13    Usage: |-
    14      Escape
    15  
    16      ```
    17      <stdin> -> escape -> <stdout>
    18  
    19      escape string to escape -> <stdout>
    20      ```
    21  
    22      Unescape
    23  
    24      ```
    25      <stdin> -> !escape -> <stdout>
    26  
    27      !escape string to unescape -> <stdout>
    28      ```
    29    Examples: |-
    30      Escape
    31  
    32      ```
    33      » out (multi
    34      » line
    35      » string) -> escape
    36      "multi\nline\nstring\n" 
    37      ```
    38    Flags:
    39    Detail:
    40    Synonyms:
    41      - escape
    42      - "!escape"
    43    Related:
    44      - esccli
    45      - eschtml
    46      - escurl
    47  
    48  - DocumentID: eschtml
    49    Title: >+
    50      `eschtml`
    51    CategoryID: commands
    52    Summary: >-
    53      Encode or decodes text for HTML
    54    Description: |-
    55      `eschtml` takes input from either STDIN or the parameters and returns the same
    56      data, HTML escaped.
    57  
    58      `!eschtml` does the same process in reverse, where it takes HTML escaped data
    59      and returns its unescaped counterpart.
    60    Usage: |-
    61      Escape
    62  
    63      ```
    64      <stdin> -> eschtml -> <stdout>
    65  
    66      eschtml string to escape -> <stdout>
    67      ```
    68  
    69      Unescape
    70  
    71      ```
    72      <stdin> -> !eschtml -> <stdout>
    73  
    74      !eschtml string to unescape -> <stdout>
    75      ```
    76    Examples: |-
    77      Escape
    78  
    79      ```
    80      » out "<h1>foo & bar</h1>" -> eschtml
    81      &lt;h1&gt;foo &amp; bar&lt;/h1&gt;
    82      ```
    83  
    84      Unescape
    85  
    86      ```
    87      » out '&lt;h1&gt;foo &amp; bar&lt;/h1&gt;' -> !eschtml
    88      <h1>foo & bar</h1>
    89      ```
    90    Flags:
    91    Detail:
    92    Synonyms:
    93      - eschtml
    94      - "!eschtml"
    95    Related:
    96      - esccli
    97      - escape
    98      - escurl
    99      - get
   100      - post
   101      - getfile
   102  
   103  - DocumentID: escurl
   104    Title: >+
   105      `escurl`
   106    CategoryID: commands
   107    Summary: >-
   108      Encode or decodes text for the URL
   109    Description: |-
   110      `escurl` takes input from either STDIN or the parameters and returns the same
   111      data, escaped for the URL.
   112  
   113      `!eschtml` does the same process in reverse, where it takes URL escaped data
   114      and returns its unescaped counterpart.
   115    Usage: |-
   116      Escape
   117  
   118      ```
   119      <stdin> -> escurl -> <stdout>
   120  
   121      escurl string to escape -> <stdout>
   122      ```
   123  
   124      Unescape
   125  
   126      ```
   127      <stdin> -> !escurl -> <stdout>
   128  
   129      !escurl string to unescape -> <stdout>
   130      ```
   131    Examples: |-
   132      Escape
   133  
   134      ```
   135      » out "!? <>" -> escurl
   136      %21%3F%20%3C%3E%0A 
   137      ```
   138  
   139      Unescape
   140  
   141      ```
   142      out '%21%3F%20%3C%3E%0A' -> !escurl
   143      !? <>
   144      ```
   145    Flags:
   146    Detail:
   147    Synonyms:
   148      - escurl
   149      - "!escurl"
   150    Related:
   151      - esccli
   152      - escape
   153      - eschtml
   154      - get
   155      - post
   156      - getfile
   157  
   158  - DocumentID: esccli
   159    Title: >+
   160      `esccli`
   161    CategoryID: commands
   162    Summary: >-
   163      Escapes an array so output is valid shell code
   164    Description: |-
   165      `esccli` takes an array and escapes any characters that might cause problems
   166      when pasted back into the terminal. Typically you'd want to use this against
   167      command parameters.
   168    Usage: |-
   169      ```
   170      <stdin> -> esccli -> <stdout>
   171  
   172      esccli @array -> <stdout>
   173      ```
   174    Examples: |-
   175      As a method
   176  
   177      ```
   178      » alias foobar=out 'foo$b@r'
   179      » alias -> [foobar]
   180      [
   181          "out",
   182          "foo$b@r"
   183      ]
   184      » alias -> [foobar] -> esccli
   185      out foo\$b\@r
   186      ```
   187  
   188      As a function
   189  
   190      ```
   191      » alias -> [foobar] -> set fb
   192      » $fb
   193      ["out","foo$b@r"]
   194      » esccli @fb
   195      out foo\$b\@r
   196      ```
   197    Flags:
   198    Detail:
   199    Synonyms:
   200    Related:
   201      - alias
   202      - out
   203      - item-index
   204      - escape
   205      - eschtml
   206      - escurl