Skip to content

Releases: nix-community/nix-zsh-completions

0.5.1

16 Mar 20:53
6e782b9
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 0.5.0...0.5.1

0.5.0

07 Aug 20:53
247e8cc
Compare
Choose a tag to compare

What's Changed

  • nix run -c: complete command names and arguments by @xzfc in #31
  • Improve completion for nix-prefetch-url(1) by @Ma27 in #36
  • Add --dry-run completion to nix-build and nix-shell by @zakame in #37
  • Update channel list suggestion in _nix_complete_dotnix_files by @anund in #38
  • Fix case of -P flag in nix-env --query by @spwhitt in #39
  • Remove broken _nix and update channels by @spwhitt in #43
  • Remove _nixpkgs-review because upstream now has completions by @Janik-Haag in #45

New Contributors

Full Changelog: 0.4.4...0.4.5

0.4.4

12 Apr 12:23
Compare
Choose a tag to compare
  • fix zsh 5.2 compatibility again (macos now runs zsh 5.2 as its default shell).
  • fix and improve nixos-option completion (#26, #24 @Ma27).
  • nixpkg-review: rename and add missing flags (#28 @Mic92).
  • plugin: fix nix run detection (#22 @Ma27).

0.4.2

04 Dec 07:26
Compare
Choose a tag to compare
  • nixos-option now offers completion, thanks to @Ma27
  • nix-prefetch-url now offers full completion (eg. taking -A)
  • Fixed a bug where --option wouldn't repeat for legacy commands
  • nix-build add --check completion

0.4.1

20 Nov 12:10
Compare
Choose a tag to compare

9fa2790 * The CLI options -E and -A can be applied multiple times
e1d7b1c * _nixos_rebuild: s/install-grub/install-bootloader
8ee3b4f * Bugfix: nix-env -iA completion failed when defexpr contained duplicates
af02f14 * Fix $NIX_SHELL detection
1939797 * nix-shell: Add completion for --run

0.3.6

28 Nov 19:52
Compare
Choose a tag to compare

bash: v0.6, zsh: 0.3.6

The quest for an awesome completion system continues.

The main bulk of changes apply to both ZSH and Bash, with explicit notes otherwise.

If evaluation of any nix code fails, ZSH will now output the error through a completion style message.

-I/--include support

Attribute path completion now takes -I and --include into account. This makes completion work correctly when doing things like this:

nix-shell -I nixpkgs=. --packages <tab>

When the completion system executes any nix code it will first resolve all URLS in the NIX_PATH, and in -I input, to a local store path if present. This protects against triggering an intrusive download while completing. channel: syntax is correctly translated to its https:// form and resolved to a cache too.

ZSH will tell you when it can't find a local cache of any URL.

--arg and --argstr support

Argument names are now offered as completions using builtins.functionArgs. Names already supplied on the command line is excluded from completions.

Attribute path completion will also take --arg and --argstr into account, which means things like this work:

nix-instantiate --eval default.nix --argstr bar foo -A <tab>

If the content of default.nix is {bar}: {foo = bar;} then completing will result in foo.

--expr and -E support

Attribute path completion now works for --expr input, including argument name completion.

Note, URLs in the expression body is not yet resolved to a local cache so might trigger a download. This should ideally be fixed.

In ZSH --expr now behaves properly, allowing completion of options after it has been entered (bash already did the correct thing here).

Other small fixes and improvements

  • Most arguments which expects a .nix file will now only offer up those and directories, reducing clutter
  • --file will now complete more than once, the last one being used to generate attribute matches. In ZSH this allows aliasing nix-env to nix-env -f '<nixpkgs>' while still getting further --file completion which can be used to override the default.
  • nix-env now offer --file completion together with main operation completion by default. This is a compromise between discover-ability of main operations and the want to specify common options quickly.
  • --add-root will now off up /nix/var/nix/gcroots/ by default, if --indirect is specified it will give normal directory completion.
  • Add missing --help and --version completion to many commands
  • nix-env: --filter-system will complete possible systems.
  • nix-instantiate: --find-file will no longer offer misleading file completion

And a bunch of other small changes and fixes.

Fix silly regression

21 Nov 12:59
Compare
Choose a tag to compare

Fix a regression where eg. nix-build -A wouldn't pick up default.nix in the current directory.

0.3.4

21 Nov 12:43
Compare
Choose a tag to compare

New features:

  • Attribute completion for cached repos specified with an url, eg. nix-build channel:nixos-17.09 -A .... This is somewhat untested on 1.12 as nix on my machine refuses to download any repos due to lack of signatures.
  • --include|-I completion for all compatible commands. (only nix takes the includes into account when completing attribute paths though)
  • nix-env: --install and others will also offer up file completion compatible with nix (ie. prefixed with ./, ~/ or /)

Bug fixes:

  • nix-store: --delete can takes file arguments
  • nix-shell --packages should now correctly offer up options after -p have been specified

0.3.3 minor fixes

13 Nov 08:38
Compare
Choose a tag to compare

Minor fixes:

  • nix-env: Fix regression where completing some option arguments offers up garbage
  • nix-env: Only complete main operators until one is supplied on the command line
  • nix: Don't run completion if nix isn't found in path

0.3.2

06 Nov 17:45
Compare
Choose a tag to compare

Now supports the nix command from nix-1.12.

Other improvements:

  • nix-env now completes stacking options with the main option
  • nix-env will understand main options at any argument position
  • Attribute path completion completes its path one by one (like directory completion), see #6
  • Some other minor improvements