NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

kubectl autocompletion does not work with ohMyZsh #78424

Open MasseGuillaume opened 4 years ago

MasseGuillaume commented 4 years ago

To Reproduce

programs.zsh = {
  enable = true;
  ohMyZsh.enable = true;
};

environment.systemPackages = [pkgs.kubectl];

Expected behavior

In a terminal, kubectl should autocomplete sub-commands

evanjs commented 4 years ago

Seems to work fine on my end. Could you post the results of nix-info -m?

And just to be sure, what is the result of nixos-option programs.zsh.enableCompletion?

MasseGuillaume commented 4 years ago

nix-info -m

 - system: `"x86_64-linux"`
 - host os: `Linux 4.19.89, NixOS, 19.09.1936.e6391b4389e (Loris)`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.3.2`
 - channels(root): `"nixos-19.09.1936.e6391b4389e, nixos-unstable-20.03pre210300.05626cc86b8"`
 - channels(gui): `"nixos-19.09.1936.e6391b4389e, nixos-unstable-20.03pre210300.05626cc86b8, nixpkgs-19.09.1936.e6391b4389e"`
 - nixpkgs: `/home/gui/.nix-defexpr/channels/nixpkgs`

nixos-option programs.zsh.enableCompletion

Value:
true

Default:
true

Example:

Description:

"Enable zsh completion for all interactive zsh shells.\n"

Declared by:
  "/home/gui/.nix-defexpr/channels/nixpkgs/nixos/modules/programs/zsh/zsh.nix"

Defined by:
  "/home/gui/.nix-defexpr/channels/nixpkgs/nixos/modules/programs/zsh/zsh.nix"
MasseGuillaume commented 4 years ago

/cc @NeQuissimus

evanjs commented 4 years ago

I wonder if this is related to #27587

stale[bot] commented 4 years ago

Hello, I'm a bot and I thank you in the name of the community for opening this issue.

To help our human contributors focus on the most-relevant reports, I check up on old issues to see if they're still relevant. This issue has had no activity for 180 days, and so I marked it as stale, but you can rest assured it will never be closed by a non-human.

The community would appreciate your effort in checking if the issue is still valid. If it isn't, please close it.

If the issue persists, and you'd like to remove the stale label, you simply need to leave a comment. Your comment can be as simple as "still important to me". If you'd like it to get more attention, you can ask for help by searching for maintainers and people that previously touched related code and @ mention them in a comment. You can use Git blame or GitHub's web interface on the relevant files to find them.

Lastly, you can always ask for help at our Discourse Forum or at #nixos' IRC channel.