github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/docs/user-guide/profile.md (about) 1 # Profile Files 2 3 > A breakdown of the different files loaded on start up 4 5 ## Description 6 7 Murex has several profile files which are loaded in the following order of 8 execution: 9 10 1. `~/.murex_preload` 11 2. `~/.murex_modules/*/` 12 3. `~/.murex_profile` 13 14 ### `.murex_preload` 15 16 This file should only used to define any environmental variables that might 17 need to be set before the modules are loaded (eg including directories in 18 `$PATH` if you have anything installed in non-standard locations). 19 20 Most of the time this file will be empty bar the standard warning message: 21 22 # This file is loaded before any murex modules. It should only contain 23 # environmental variables required for the modules to work eg: 24 # 25 # export PATH=... 26 # 27 # Any other profile config belongs in your profile script instead: 28 # /home/$USER/.murex_profile 29 30 This file is created upon the first run of Murex. 31 32 ### `.murex_modules/` 33 34 Murex's module directory - where all the modules are installed 35 to. This directory is managed by `murex-package` builtin. 36 37 ### `.murex_profile` 38 39 This file is comparable to `.bash_profile`, `.bashrc` and `.zshrc` etc. It 40 is the standard place to put all user and/or machine specific config in. 41 42 `.murex_profile` is only read from the users home directory. Unlike bash et 43 al, profiles will not be read from `/etc/profile.d` nor similar. Modules 44 should be used in its place. 45 46 ## Overriding The Default Paths (XDG) 47 48 Some individuals, particularly those running Linux, follow a standard called 49 [XDG Base Directory Specification](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html). 50 While Murex does not adhere to this standard, instead conforming to the 51 _de facto_ standard defined by the past precedents of previous shells, in 52 order to offer flexibility for those who do prefer the XDG specification 53 Murex does support overriding its own default paths via special environmental 54 variables. 55 56 - `MUREX_PRELOAD` defines the preload path (and file name) 57 - `MUREX_MODULES` defines the module path (only) 58 - `MUREX_PROFILE` defines the profile path (and file name) 59 60 Where `MUREX_PRELOAD` and/or `MUREX_PROFILE` are directories rather than 61 absolute file names, the path is appended with the default file names as 62 named above. 63 64 For people who wish to use XDG paths, in many instances you can get away 65 with setting the follow prior to launching Murex (eg in `/etc/profile.d`): 66 67 ``` 68 MUREX_PRELOAD="$XDG_CONFIG_HOME/murex/" 69 MUREX_MODULES="$XDG_CONFIG_HOME/murex/" 70 MUREX_PROFILE="$XDG_CONFIG_HOME/murex/" 71 ``` 72 73 This, however, depends on `$XDG_CONFIG_HOME` pointing to a single path rather 74 than an array of paths (like `$PATH`). In that instance you can still use 75 custom paths in Murex but you might need to get a little more creative in 76 how you define that value. 77 78 ## See Also 79 80 * [Modules and Packages](../user-guide/modules.md): 81 An introduction to Murex modules and packages 82 * [`export`](../commands/export.md): 83 Define an environmental variable and set it's value 84 * [`murex-package`](../commands/murex-package.md): 85 Murex's package manager 86 87 <hr/> 88 89 This document was generated from [gen/user-guide/profile_doc.yaml](https://github.com/lmorg/murex/blob/master/gen/user-guide/profile_doc.yaml).