/ › JDHQ › Environment variable standards
    Sign in

    On this page

    • Environment variable standards
      • Namespace
      • Variables

    Settings

    Command line

    • The 'jd' command-line app
    • Environment variable standards
    • cd directly to a folder
    • Zsh prompt improvements

    Environment variable standards

    It's helpful to define environment variables for use in your shell (see environ(7)). The Johnny.Decimal system defines the following standards. Use them and your tools will work with mine.

    Namespace

    Every variable starts JD_.

    export JD_VAR=something

    Hierarchy

    For multiple systems, the system identifier comes before the item.

    # JD_<SYS identifier>_<item>
    
    # āœ…
    export JD_D25_ROOT="/some/path"
    
    # āŒ
    export JD_ROOT_D25="/some/path"

    Variables

    Filesystem root

    # Single system
    export JD_PATH="/Users/john/Documents"
    
    # Multiple systems
    export JD_D25_PATH="/Users/john/Documents/D25"

    JDex root

    If your JDex is accessible by your filesystem (e.g. an Obsidian vault) define its root.1

    # Single system
    export JD_JDEX="/Users/john/Documents/JDex"
    
    # Multiple systems
    export JD_D25_JDEX="/Users/john/Documents/D25/JDex"

    Footnotes

    1. Noting that your Obsidian vault should live at 00.00 in your Johnny.Decimal system. That makes the path long so I simplified the example code. See blog/0182 for a deep-dive. ↩


    ā—€ Back The 'jd' command-line a… cd directly to a folder Next ā–¶ (Use the ← arrow keys →)

    Written by humans • Search • Support