Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benches/go/mise/tables.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion benches/mise.usage.kdl
Original file line number Diff line number Diff line change
Expand Up @@ -2796,7 +2796,7 @@ e.g.: NODE_ENV=production
"""#
}
cmd settings help="Manage settings" effect=write {
after_long_help "\u{1b}[1m\u{1b}[4mExamples:\u{1b}[22m\u{1b}[24m\n # list all settings\n $ \u{1b}[1mmise settings\u{1b}[22m\n\n # get the value of the setting \"always_keep_download\"\n $ \u{1b}[1mmise settings always_keep_download\u{1b}[22m\n\n # set the value of the setting \"always_keep_download\" to \"true\"\n $ \u{1b}[1mmise settings always_keep_download=true\u{1b}[22m\n\n # set the value of the setting \"node.mirror_url\" to \"https://npmmirror.com/mirrors/node/\"\n $ \u{1b}[1mmise settings node.mirror_url https://npmmirror.com/mirrors/node/\u{1b}[22m\n"
after_long_help "\u{1b}[1m\u{1b}[4mExamples:\u{1b}[22m\u{1b}[24m\n\n # list all settings\n $ \u{1b}[1mmise settings\u{1b}[22m\n\n # get the value of the setting \"always_keep_download\"\n $ \u{1b}[1mmise settings always_keep_download\u{1b}[22m\n\n # set the value of the setting \"always_keep_download\" to \"true\"\n $ \u{1b}[1mmise settings always_keep_download=true\u{1b}[22m\n\n # set the value of the setting \"node.mirror_url\" to \"https://npmmirror.com/mirrors/node/\"\n $ \u{1b}[1mmise settings node.mirror_url https://npmmirror.com/mirrors/node/\u{1b}[22m\n"
flag "-a --all" help="List all settings"
flag "-J --json" help="Output in JSON format"
flag "-l --local" help="Use the local config file instead of the global one" global=#true
Expand Down
2 changes: 1 addition & 1 deletion benches/shadows/mise/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4648,7 +4648,7 @@ pub struct SettingsUnsetArgs {
/// Manage settings
#[derive(Args)]
#[usage(
after_long_help = "\u{1b}[1m\u{1b}[4mExamples:\u{1b}[22m\u{1b}[24m\n # list all settings\n $ \u{1b}[1mmise settings\u{1b}[22m\n\n # get the value of the setting \"always_keep_download\"\n $ \u{1b}[1mmise settings always_keep_download\u{1b}[22m\n\n # set the value of the setting \"always_keep_download\" to \"true\"\n $ \u{1b}[1mmise settings always_keep_download=true\u{1b}[22m\n\n # set the value of the setting \"node.mirror_url\" to \"https://npmmirror.com/mirrors/node/\"\n $ \u{1b}[1mmise settings node.mirror_url https://npmmirror.com/mirrors/node/\u{1b}[22m\n",
after_long_help = "\u{1b}[1m\u{1b}[4mExamples:\u{1b}[22m\u{1b}[24m\n\n # list all settings\n $ \u{1b}[1mmise settings\u{1b}[22m\n\n # get the value of the setting \"always_keep_download\"\n $ \u{1b}[1mmise settings always_keep_download\u{1b}[22m\n\n # set the value of the setting \"always_keep_download\" to \"true\"\n $ \u{1b}[1mmise settings always_keep_download=true\u{1b}[22m\n\n # set the value of the setting \"node.mirror_url\" to \"https://npmmirror.com/mirrors/node/\"\n $ \u{1b}[1mmise settings node.mirror_url https://npmmirror.com/mirrors/node/\u{1b}[22m\n",
effect = "write",
group("output")
)]
Expand Down
2 changes: 0 additions & 2 deletions docs/cli/reference/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,6 @@

# `usage`

**Usage:** `usage [--completions <COMPLETIONS>] [--usage-spec] <SUBCOMMAND>`

**Version:** 6.7.1

**Repository:** https://github.com/jdx/usage
Expand Down
125 changes: 52 additions & 73 deletions examples/docs/MISE_INLINE.md
Original file line number Diff line number Diff line change
Expand Up @@ -277,29 +277,19 @@ Runs the bootstrap steps for the current config in order:
9. `mise bootstrap mise-shell-activate apply` — configure shell activation
from `[bootstrap.mise_shell_activate]`
10. `mise bootstrap macos defaults apply` — write
```
`[bootstrap.macos.defaults]` entries (macOS)
surrounded by `pre-defaults`/`post-defaults` hooks
```
`[bootstrap.macos.defaults]` entries (macOS)
surrounded by `pre-defaults`/`post-defaults` hooks
11. `mise bootstrap macos launchd-agents apply` — install/load
```
`[bootstrap.macos.launchd.agents]`
```
`[bootstrap.macos.launchd.agents]`
12. `mise bootstrap linux systemd-units apply` — install/start
```
`[bootstrap.linux.systemd.units]`
```
`[bootstrap.linux.systemd.units]`
13. `mise bootstrap user apply` — set `[bootstrap.user].login_shell`
```
(Unix)
surrounded by `pre-user`/`post-user` hooks
```
(Unix)
surrounded by `pre-user`/`post-user` hooks
14. `mise install` — install missing tools from `[tools]`
```
surrounded by `pre-tools`/`post-tools` hooks; package-plugin entries
from `[bootstrap.packages]` install afterward, followed by
`[bootstrap.hooks.post-packages]`
```
surrounded by `pre-tools`/`post-tools` hooks; package-plugin entries
from `[bootstrap.packages]` install afterward, followed by
`[bootstrap.hooks.post-packages]`
15. `mise run bootstrap` — if a task named `bootstrap` is defined 16. `[bootstrap.hooks.final]` — optional final hook

The declarative steps converge — anything already in its desired state is skipped, so re-running is safe. The `bootstrap` task runs on every invocation; keep it idempotent. Use it for any project-specific setup that doesn't fit the declarative sections (seeding databases, auth flows, etc.) — it runs with the installed tools on PATH.
Expand Down Expand Up @@ -3250,6 +3240,7 @@ Manage settings
- **`--json-extended`** — Output in JSON format with sources

Examples:

```
# list all settings
$ mise settings
Expand Down Expand Up @@ -4764,26 +4755,18 @@ For more advanced process management (daemon management, auto-restart, readiness
- 'path | file_size' returns the size of the file at path, or null if it does not exist.

- 'path | file_read(bytes)' returns a string with the first n bytes of the file at path.
```
If the file is smaller than n bytes, the whole file is returned. There is no filter to
read the whole file at once to encourage limiting the amount of data read and processed.
```
If the file is smaller than n bytes, the whole file is returned. There is no filter to
read the whole file at once to encourage limiting the amount of data read and processed.

- 'string | hash', and 'path | file_hash' return the hash of the string or file at path.
```
No guarantee is made about the algorithm used: treat it as an opaque value.
```
No guarantee is made about the algorithm used: treat it as an opaque value.

- 'any | kv_store(key)', 'kv_fetch(key)', and 'kv_clear' provide a simple key-value store.
```
Data is kept in memory only, there is no persistence. Consistency is not guaranteed.
```
Data is kept in memory only, there is no persistence. Consistency is not guaranteed.

- 'any | printout', 'any | printerr', and 'any | log(level)' will print or log any given
```
value to stdout, stderr, or the log (levels = error, warn, info, debug, trace), and
pass the value through (so '[1] | log("debug") | .[]' will produce a '1' and log '[1]').
```
value to stdout, stderr, or the log (levels = error, warn, info, debug, trace), and
pass the value through (so '[1] | log("debug") | .[]' will produce a '1' and log '[1]').

All filtering done with such programs, and especially those using kv or filesystem access, is much slower than the other filtering methods. If filtering is too slow, events will back up and stall watchexec. Take care when designing your filters.

Expand Down Expand Up @@ -4913,53 +4896,49 @@ For more advanced process management (daemon management, auto-restart, readiness

```json
{
```
"tags": [
{
"kind": "path",
"absolute": "/home/user/your/new-folder",
"filetype": "dir"
},
{
"kind": "fs",
"simple": "create",
"full": "Create(Folder)"
},
{
"kind": "source",
"source": "filesystem",
}
],
"metadata": {
"notify-backend": "inotify"
}
```
"tags": [
{
"kind": "path",
"absolute": "/home/user/your/new-folder",
"filetype": "dir"
},
{
"kind": "fs",
"simple": "create",
"full": "Create(Folder)"
},
{
"kind": "source",
"source": "filesystem",
}
],
"metadata": {
"notify-backend": "inotify"
}
}
```

The fields are as follows:

- `tags`, structured event data.
- `tags[].kind`, which can be:
```
* 'path', along with:
+ `absolute`, an absolute path.
+ `filetype`, a file type if known ('dir', 'file', 'symlink', 'other').
* 'fs':
+ `simple`, the "simple" event type ('access', 'create', 'modify', 'remove', or 'other').
+ `full`, the "full" event type, which is too complex to fully describe here, but looks like 'General(Precise(Specific))'.
* 'source', along with:
+ `source`, the source of the event ('filesystem', 'keyboard', 'mouse', 'os', 'time', 'internal').
* 'keyboard', along with:
+ `keycode`. Currently only the value 'eof' is supported.
* 'process', for events caused by processes:
+ `pid`, the process ID.
* 'signal', for signals sent to Watchexec:
+ `signal`, the normalised signal name ('hangup', 'interrupt', 'quit', 'terminate', 'user1', 'user2').
* 'completion', for when a command ends:
+ `disposition`, the exit disposition ('success', 'error', 'signal', 'stop', 'exception', 'continued').
+ `code`, the exit, signal, stop, or exception code.
```
* 'path', along with:
+ `absolute`, an absolute path.
+ `filetype`, a file type if known ('dir', 'file', 'symlink', 'other').
* 'fs':
+ `simple`, the "simple" event type ('access', 'create', 'modify', 'remove', or 'other').
+ `full`, the "full" event type, which is too complex to fully describe here, but looks like 'General(Precise(Specific))'.
* 'source', along with:
+ `source`, the source of the event ('filesystem', 'keyboard', 'mouse', 'os', 'time', 'internal').
* 'keyboard', along with:
+ `keycode`. Currently only the value 'eof' is supported.
* 'process', for events caused by processes:
+ `pid`, the process ID.
* 'signal', for signals sent to Watchexec:
+ `signal`, the normalised signal name ('hangup', 'interrupt', 'quit', 'terminate', 'user1', 'user2').
* 'completion', for when a command ends:
+ `disposition`, the exit disposition ('success', 'error', 'signal', 'stop', 'exception', 'continued').
+ `code`, the exit, signal, stop, or exception code.
- `metadata`, additional information about the event.

The 'json-stdio' mode will emit JSON events to the standard input of the command, one per line, then close stdin. The 'json-file' mode will create a temporary file, write the events to it, and provide the path to the file with the $WATCHEXEC_EVENTS_FILE environment variable.
Expand Down
Loading