{"record":{"id":"a70bcf8bd436cffa","repo":"ajeetdsouza/zoxide","slug":"could-not-find-fzf-is-it-installed","errorCode":null,"errorMessage":"could not find fzf, is it installed?","messagePattern":"could not find fzf, is it installed\\?","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/util.rs","lineNumber":34,"sourceCode":"pub const SECOND: Epoch = 1;\npub const MINUTE: Epoch = 60 * SECOND;\npub const HOUR: Epoch = 60 * MINUTE;\npub const DAY: Epoch = 24 * HOUR;\npub const WEEK: Epoch = 7 * DAY;\npub const MONTH: Epoch = 30 * DAY;\n\npub struct Fzf(Command);\n\nimpl Fzf {\n    const ERR_FZF_NOT_FOUND: &'static str = \"could not find fzf, is it installed?\";\n\n    pub fn new() -> Result<Self> {\n        // On Windows, CreateProcess implicitly searches the current working\n        // directory for the executable, which is a potential security issue.\n        // Instead, we resolve the path to the executable and then pass it to\n        // CreateProcess.\n        #[cfg(windows)]\n        let program = which::which(\"fzf.exe\").map_err(|_| anyhow!(Self::ERR_FZF_NOT_FOUND))?;\n        #[cfg(not(windows))]\n        let program = \"fzf\";\n\n        // TODO: check version of fzf here.\n\n        let mut cmd = Command::new(program);\n        cmd.args([\n            // Search mode\n            \"--delimiter=\\t\",\n            \"--nth=2\",\n            // Scripting\n            \"--read0\",\n        ])\n        .stdin(Stdio::piped())\n        .stdout(Stdio::piped());\n\n        Ok(Fzf(cmd))\n    }","sourceCodeStart":16,"sourceCodeEnd":52,"githubUrl":"https://github.com/ajeetdsouza/zoxide/blob/ee594e690642c7d86edd960603dcc1950c02baab/src/util.rs#L16-L52","documentation":"Error \"could not find fzf, is it installed?\" thrown in ajeetdsouza/zoxide.","triggerScenarios":"Thrown at src/util.rs:34 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ee594e690642c7d86edd960603dcc1950c02baab","analyzedAt":"2026-08-16T10:52:10.953Z","schemaVersion":2},"datasetVersion":"2026-08-16T13:17:31.715Z"}