Commit 1bea8f0f2916

Vincent Demeester <vincent@sbr.pm>
2026-02-17 15:59:35
fix(pi): improved shell-completions NixOS compatibility
Added fallback to resolve bash via PATH using 'which' command before hardcoded /bin/bash path. This ensures shell completions work on NixOS where bash is in /run/current-system/sw/bin/bash. Also added dots/pi/agent/models.json to .gitignore as it's local configuration for llama-cpp models.
1 parent 4f801bc
Changed files (2)
dots
pi
agent
extensions
shell-completions
dots/pi/agent/extensions/shell-completions/index.ts
@@ -100,6 +100,13 @@ function findCompletionShell(): ShellInfo {
 		}
 	}
 
+	// Try resolving from PATH (NixOS compat)
+	try {
+		const { execSync } = require("node:child_process");
+		const which = execSync("which bash", { encoding: "utf-8", timeout: 5000 }).trim();
+		if (which) return { path: which, type: "bash" };
+	} catch { /* ignore */ }
+
 	return { path: "/bin/bash", type: "bash" };
 }
 
.gitignore
@@ -30,3 +30,4 @@ hardware-configuration.nix
 .playwright-mcp/
 .claude/skills/
 node_modules/
+dots/pi/agent/models.json