hedning / nix-bash-completions

Bash completion for the Nix command line tools
BSD 3-Clause "New" or "Revised" License
52 stars 11 forks source link

It doesn't seem like completions for nixops are actually working #12

Open Avaq opened 4 years ago

Avaq commented 4 years ago

I tried:

  1. Setting programs.bash.enableCompletion = true; in my nixos config. This appears to enable completions for most nix related commands, but nothing for nixops.
  2. With enableCompletion = true still, cloning this repo and sourcing _nix, which doesn't change anything for nixops.
  3. Rebuilding with enableCompletion = false (and verifying that I no longer have completions for any nix commands), and attempting to source _nix leads to bash: _nix: line 496: syntax error near unexpected token '('.

Related: https://github.com/NixOS/nixops/issues/849

hedning commented 4 years ago

Hmm, right, looks I disabled nixops completion in 2018 as it didn't work very well.

Now I don't use nixops so if someone is up for the task I'd happily accept a PR which fleshes out the current (disabled) implementation.

To turn on the current implementation, simply:

Avaq commented 4 years ago

I've been using nixops a lot recently, but I've never looked at how bash completions work. When I feel like taking the dive I'll give it a go though! :)