This commit is contained in:
atagen 2026-03-23 15:06:49 +11:00
parent 76656231be
commit adea668355
6 changed files with 76 additions and 27 deletions

View file

@ -57,9 +57,8 @@
imports = [ ./nix/module.nix ];
programs.inshellah.package = self.packages.${pkgs.stdenv.hostPlatform.system}.default;
programs.inshellah.snippet = ''
let cache_home = if ('XDG_CACHE_HOME' in $env) { "--dir " + $env.XDG_CACHE_HOME } else if ('HOME' in $env) { "--dir " + $env.HOME + '/.cache/inshellah' } else { "" }
let inshellah_complete = {|spans|
${lib.getExe config.programs.inshellah.package} complete "$spans" $cache_home --system-dir /run/current-system/sw/${config.programs.inshellah.completionsPath}
${lib.getExe config.programs.inshellah.package} complete ...$spans --system-dir /run/current-system/sw/${config.programs.inshellah.completionsPath} | from json
}
$env.config.completions.external = {
enable: true