jdx/mise · error

unknown trigger

Error message

unknown trigger {trigger:?}

What it means

`mise dotfiles history ls --trigger <name>` filters checkpoint entries by their trigger kind. The value is parsed with Trigger::parse; an unrecognized string bails with the offending value quoted for debug visibility.

Solutions

  1. Run `mise dotfiles history ls` without --trigger and inspect which triggers appear in entries
  2. Check `mise dotfiles history ls --help` for the accepted trigger values
  3. Retry with a valid trigger name (correct spelling/casing)

Example fix

// before
mise dotfiles history ls --trigger Manual
// after
mise dotfiles history ls --trigger manual   # or the exact enum value from --help
Defensive patterns

Strategy: validation

Validate before calling

mise dotfiles history ls --help | grep -A5 trigger   # list accepted trigger values

Try / catch

match Err(msg) if msg.starts_with("unknown trigger") => print valid trigger values from help and retry

Prevention

When it happens

Trigger: `mise dotfiles history ls --trigger manual` (or any string not in the Trigger enum) — parse fails and the bail fires with {trigger:?} showing the raw input.

Common situations: Guessing trigger names instead of checking valid values; typo like 'automatc'; casing mismatch; older docs referencing a renamed trigger kind.

Understand the failure class

Background: Invalid enum value errors: "Unknown type", "Invalid scope", "must be one of" — when a string is not on the library's allowed list — this error's family across 23 libraries.

Related errors


AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17). Data as JSON: /api/errors/f3c79ca5b5e0650b. Report an issue: GitHub.

Appendix: source

Thrown at src/cli/dotfiles/history/ls.rs:61

                .into_iter()
                .map(|(_, pending)| crate::system::history::store::Entry {
                    id: pending.id,
                    commit: String::new(),
                    checkpoint: pending.checkpoint,
                })
                .collect();
        }
        entries.reverse();
        if let Some(label) = &self.label {
            entries.retain(|entry| entry.checkpoint.labels.contains(label));
        }
        if let Some(path) = &self.path {
            let path = display_arg(path);
            entries.retain(|entry| entry.checkpoint.changes.touches(&path));
        }
        if let Some(trigger) = &self.trigger {
            let Some(trigger) = Trigger::parse(trigger) else {
                eyre::bail!("unknown trigger {trigger:?}");
            };
            entries.retain(|entry| entry.checkpoint.trigger == trigger);
        }
        if self.limit > 0 {
            entries.truncate(self.limit);
        }
        if self.json {
            miseprintln!("{}", serde_json::to_string_pretty(&entries)?);
            return Ok(());
        }
        if entries.is_empty() {
            info!("no history checkpoints recorded");
            return Ok(());
        }
        let mut table = MiseTable::new(false, &["ID", "When", "Trigger", "Description", "Files"]);
        for entry in &entries {
            let checkpoint = &entry.checkpoint;
            let files = if checkpoint.tree.available {

View on GitHub (pinned to 533346cc37)