diff --git a/docs/.vitepress/cli_commands.ts b/docs/.vitepress/cli_commands.ts index 664ee868c3..0cba2f3123 100644 --- a/docs/.vitepress/cli_commands.ts +++ b/docs/.vitepress/cli_commands.ts @@ -80,7 +80,7 @@ export const commands: { [key: string]: Command } = { hide: false, }, direnv: { - hide: false, + hide: true, subcommands: { envrc: { hide: true, @@ -89,7 +89,7 @@ export const commands: { [key: string]: Command } = { hide: true, }, activate: { - hide: false, + hide: true, }, }, }, diff --git a/docs/cli/index.md b/docs/cli/index.md index 478d353318..3328ff5014 100644 --- a/docs/cli/index.md +++ b/docs/cli/index.md @@ -63,8 +63,6 @@ Answer yes to all confirmation prompts - [`mise config ls [--no-header] [-J --json]`](/cli/config/ls.md) - [`mise config set [-f --file ] [-t --type ] `](/cli/config/set.md) - [`mise deactivate`](/cli/deactivate.md) -- [`mise direnv `](/cli/direnv.md) -- [`mise direnv activate`](/cli/direnv/activate.md) - [`mise doctor`](/cli/doctor.md) - [`mise en [-s --shell ] [DIR]`](/cli/en.md) - [`mise env [FLAGS] [TOOL@VERSION]...`](/cli/env.md) diff --git a/docs/direnv.md b/docs/direnv.md index 9ad40f6fa7..69730f4cbb 100644 --- a/docs/direnv.md +++ b/docs/direnv.md @@ -1,16 +1,18 @@ -# direnv +# direnv [direnv](https://direnv.net) and mise both manage environment variables based on directory. Because they both analyze the current environment variables before and after their respective "hook" commands are run, they can sometimes conflict with each other. +::: warning The official stance is you should not use direnv with mise. Issues arising from incompatibilities are not considered bugs. If mise has feature gaps that direnv resolves, please open an issue so we can close those gaps. While that's the official stance, the reality is mise and direnv usually will work together just fine despite this. It's only more advanced use-cases where problems arise. +::: If you have an issue, it's likely to do with the ordering of PATH. This means it would really only be a problem if you were trying to manage the same tool with direnv and mise. For diff --git a/man/man1/mise.1 b/man/man1/mise.1 index 778cfeb1fe..63b9ac792e 100644 --- a/man/man1/mise.1 +++ b/man/man1/mise.1 @@ -74,9 +74,6 @@ Manage config files mise\-deactivate(1) Disable mise for current shell session .TP -mise\-direnv(1) -Output direnv function to use mise inside direnv -.TP mise\-doctor(1) Check mise installation for possible problems .TP diff --git a/mise.usage.kdl b/mise.usage.kdl index 7e69f58442..4be19a7201 100644 --- a/mise.usage.kdl +++ b/mise.usage.kdl @@ -311,7 +311,7 @@ This can be used to temporarily disable mise in a shell session." $ mise deactivate " } -cmd "direnv" help="Output direnv function to use mise inside direnv" { +cmd "direnv" hide=true help="Output direnv function to use mise inside direnv" { long_help r"Output direnv function to use mise inside direnv See https://mise.jdx.dev/direnv.html for more information @@ -321,7 +321,7 @@ you should run this command after installing new plugins. Otherwise direnv may not know to update environment variables when idiomatic file versions change." cmd "envrc" hide=true help="[internal] This is an internal command that writes an envrc file\nfor direnv to consume." cmd "exec" hide=true help="[internal] This is an internal command that writes an envrc file\nfor direnv to consume." - cmd "activate" help="Output direnv function to use mise inside direnv" { + cmd "activate" hide=true help="Output direnv function to use mise inside direnv" { long_help r"Output direnv function to use mise inside direnv See https://mise.jdx.dev/direnv.html for more information diff --git a/xtasks/fig/src/mise.ts b/xtasks/fig/src/mise.ts index 9061168ae1..265992beea 100644 --- a/xtasks/fig/src/mise.ts +++ b/xtasks/fig/src/mise.ts @@ -822,20 +822,6 @@ const completionSpec: Fig.Spec = { ], "description": "Disable mise for current shell session" }, - { - "name": [ - "direnv" - ], - "description": "Output direnv function to use mise inside direnv", - "subcommands": [ - { - "name": [ - "activate" - ], - "description": "Output direnv function to use mise inside direnv" - } - ] - }, { "name": [ "doctor",