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

     1  # Tilde (`~`) Token
     2  
     3  > Home directory path variable
     4  
     5  ## Description
     6  
     7  The tilde token is used as a lazy reference to the users home directory.
     8  
     9  
    10  
    11  ## Examples
    12  
    13  ```
    14  » out ~
    15  /home/bob
    16  
    17  » out ~joe
    18  /home/joe
    19  ```
    20  
    21  ## Detail
    22  
    23  Tilde can be expanded inside double quotes, brace quotes as well as used naked.
    24  But it cannot be expanded inside single quotes.
    25  
    26  ```
    27  » out ~
    28  /home/bob
    29  
    30  » out '~'
    31  ~
    32  
    33  » out "~"
    34  /home/bob
    35  
    36  » out %(~)
    37  /home/bob
    38  ```
    39  
    40  ## See Also
    41  
    42  * [Array (`@`) Token](../parser/array.md):
    43    Expand values as an array
    44  * [Reserved Variables](../user-guide/reserved-vars.md):
    45    Special variables reserved by Murex
    46  * [`"Double Quote"`](../parser/double-quote.md):
    47    Initiates or terminates a string (variables expanded)
    48  * [`%(Brace Quote)`](../parser/brace-quote.md):
    49    Initiates or terminates a string (variables expanded)
    50  * [`'Single Quote'`](../parser/single-quote.md):
    51    Initiates or terminates a string (variables not expanded)
    52  * [`(brace quote)`](../parser/brace-quote-func.md):
    53    Write a string to the STDOUT without new line (deprecated)
    54  * [`ja` (mkarray)](../commands/ja.md):
    55    A sophisticated yet simply way to build a JSON array
    56  * [`out`](../commands/out.md):
    57    Print a string to the STDOUT with a trailing new line character
    58  * [`set`](../commands/set.md):
    59    Define a local variable and set it's value
    60  * [`string` (stringing)](../types/str.md):
    61    string (primitive)
    62  
    63  <hr/>
    64  
    65  This document was generated from [gen/parser/variables_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/parser/variables_doc.yaml).