{"record":{"id":"4f7d6f6eb725c220","repo":"zellij-org/zellij","slug":"swap-layout-not-found-for","errorCode":null,"errorMessage":"Swap Layout not found for: {}","messagePattern":"Swap Layout not found for: (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"zellij-utils/src/setup.rs","lineNumber":202,"sourceCode":"                    let content = fs::read_to_string(path)?;\n                    std::io::stdout().write_all(content.as_bytes())\n                },\n                _ => {\n                    log::error!(\"No layout named {custom} found\");\n                    return Ok(());\n                },\n            }\n        },\n    }\n}\n\npub fn dump_specified_swap_layout(swap_layout: &str) -> std::io::Result<()> {\n    match swap_layout {\n        \"strider\" => dump_asset(STRIDER_SWAP_LAYOUT),\n        \"default\" => dump_asset(DEFAULT_SWAP_LAYOUT),\n        \"compact\" => dump_asset(COMPACT_BAR_SWAP_LAYOUT),\n        \"classic\" => dump_asset(CLASSIC_SWAP_LAYOUT),\n        not_found => Err(std::io::Error::new(\n            std::io::ErrorKind::Other,\n            format!(\"Swap Layout not found for: {}\", not_found),\n        )),\n    }\n}\n\n#[cfg(not(target_family = \"wasm\"))]\npub fn dump_builtin_plugins(path: &PathBuf) -> Result<()> {\n    for (asset_path, bytes) in ASSET_MAP.iter() {\n        let plugin_path = path.join(asset_path);\n        plugin_path\n            .parent()\n            .with_context(|| {\n                format!(\n                    \"failed to acquire parent path of '{}'\",\n                    plugin_path.display()\n                )\n            })","sourceCodeStart":184,"sourceCodeEnd":220,"githubUrl":"https://github.com/zellij-org/zellij/blob/98a0837077492d53dd252ab30bc3e43e41e504f4/zellij-utils/src/setup.rs#L184-L220","documentation":"Returned by dump_specified_swap_layout when the requested swap-layout name is not one of the four built-ins: strider, default, compact, classic. The function can only dump assets compiled into the binary, so any other name (including a custom swap layout on disk) fails.","triggerScenarios":"Passing a name other than strider/default/compact/classic to the setup option that dumps a swap layout (e.g. `zellij setup --dump-swap-layout <name>`), including typos and custom layout names.","commonSituations":"Users expecting `--dump-swap-layout` to work for layouts installed in the layout directory; typos like 'clasIC' or 'compac'; scripts written against a fork with extra bundled layouts.","solutions":["Use one of the four supported names exactly: default, compact, classic, strider","For custom swap layouts, read them from your layout directory instead of the dump command","Check `zellij setup --check` output for where custom layouts live"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const BUILTIN_SWAP_LAYOUTS: &[&str] = &[\"strider\", \"default\", \"compact\", \"classic\"];\nfn swap_layout_is_builtin(name: &str) -> bool {\n    BUILTIN_SWAP_LAYOUTS.contains(&name)\n}","typeGuard":"fn is_builtin_swap_layout(name: &str) -> bool {\n    matches!(name, \"strider\" | \"default\" | \"compact\" | \"classic\")\n}","tryCatchPattern":null,"preventionTips":["Restrict dump requests to the four compiled-in names: default, compact, classic, strider","Custom swap layouts belong in the layout directory, not the asset dump path","Tab-complete or validate names in wrapper scripts to avoid typos"],"tags":["setup","layouts","swap-layout","cli"],"backgroundTag":null,"analyzedSha":"98a0837077492d53dd252ab30bc3e43e41e504f4","analyzedAt":"2026-08-16T13:02:01.396Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}