Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on nixos-option completion #35

Open
toothbrush opened this issue Sep 9, 2020 · 1 comment
Open

Failure on nixos-option completion #35

toothbrush opened this issue Sep 9, 2020 · 1 comment

Comments

@toothbrush
Copy link

Description

I'm running into an issue where nixos-option isn't able to complete. I think the failure is inside _nix_eval_stdin, but i'm not sure why. It's returning empty from inside _nix_attr_paths. The error shown is:

$ nixos-option
Completing Eval failed, can't complete (an URL might not be cached):
 
Trace output left in /tmp/zsh28661nixos-option2 (up-history to view)

I have a fair bit of configuration in my .zshrc, from before when i used to run Arch Linux -- so perhaps this is messing with me, but i'm not sure how to debug -- apologies! However, when I completely remove my own Zsh config, things still seem to break.

I've set programs.zsh.enable = true; in my configuration.nix, and many of the completions seem fine, e.g. nixos-option --<TAB> expands to nixos-option --all.

Reproduction steps

Set programs.zsh.enable = true; in configuration.nix, restart session, open terminal and type nixos-option <TAB>.

System

  • nix-zsh-completions version: nix-zsh-completions-0.4.4
  • ZSH version: 5.8
  • NIX_PATH: nixpkgs=/nix/var/nix/profiles/per-user/root/channels/nixos:nixos-config=/etc/nixos/configuration.nix:/nix/var/nix/profiles/per-user/root/channels
  • system: "x86_64-linux"
  • host os: Linux 5.8.6, NixOS, 21.03.git.8418716f7b9 (Okapi)
  • multi-user?: yes
  • sandbox: yes
  • version: nix-env (Nix) 2.3.7
  • nixpkgs: /nix/var/nix/profiles/per-user/root/channels/nixos

Completion trace

With no ~/.zshrc at all: https://gist.github.com/toothbrush/17426406b47b71934358019eda5ad171
With my usual ~/.zshrc: https://gist.github.com/toothbrush/4f32d5bcd63fb6e238567f1b3a3f5e3c

@Freed-Wu
Copy link

I can reproduce this bug:

$ nixos-option <TAB>
Eval failed, can't complete (an URL might not be cached):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants