Bradley Kirton's Blog

Published on Feb. 19, 2024

Go home

Adding scripts to PATH with mise-en-place

Mise-en-place has a neat trick for making your scripts to rule them all automatically available to you when you cd into your project.

Suppose we have the following scripts available.

➜tree scripts

scripts
├── ,editvault
├── ,printvault
├── ,rekeyvault
├── ,runplay
└── ,ssh

1 directory, 5 files

Note all the scripts begin with ,. This trick is taken from Brandon Rhodes's talk Activation Energy.

Finally we can set the path environment directive in our .mise.toml config file as follows.

[env]
_.path = "./scripts"

Now once we cd into our project, type , and press tab we get the following output.

➜your_project git:(main) ✗ ,

,editvault   ,printvault  ,rekeyvault  ,runplay  ,ssh