atuinsh/atuin · error

failed to set fish language

Error message

failed to set fish language

What it means

Error "failed to set fish language" thrown in atuinsh/atuin.

Source

Thrown at crates/atuin-ai/src/permissions/shell.rs:181

        }

        let name = name?;
        let full = if let (Some(start), Some(end)) = (name_start, arg_end) {
            std::str::from_utf8(&source[start..end]).ok()?.to_string()
        } else {
            name.clone()
        };

        Some(ShellCommand { name, full })
    }

    // ────────────────────────────────────────────────────────────────
    // Fish parser
    // ────────────────────────────────────────────────────────────────

    fn fish_parser() -> Parser {
        let mut parser = Parser::new();
        parser.set_language(&tree_sitter_fish::language()).expect("failed to set fish language");
        parser
    }

    pub(super) fn parse_fish(code: &str) -> ParsedShellCommand {
        let mut parser = fish_parser();
        let Some(tree) = parser.parse(code, None) else {
            return parse_fallback(code);
        };

        let mut commands = Vec::new();
        walk_fish_tree(&tree, code.as_bytes(), &mut commands);
        ParsedShellCommand {
            subcommands: commands,
        }
    }

    const FISH_COMPOUND: &[&str] = &[
        "conditional_execution",

View on GitHub (pinned to 15fe1318f1)

Solutions

  1. Check that the tree-sitter fish grammar is available; rebuild with the correct features.

When it happens

Trigger: Fires when initializing the tree-sitter fish language for shell permission parsing fails.

Common situations: See trigger scenarios.


AI-assisted analysis of atuinsh/atuin@15fe1318f1 (2026-08-19). Data as JSON: /api/errors/b1f05ba0e79bbdfe. Report an issue: GitHub.