nix-bash-completions: 0.5 -> 0.6, nix-zsh-completions: 0.3.5 -> 0.3.6 #32149
+4
−4
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Should be safe to backport to 17.09 as there's nothing which depends on these packages. I've tested installation via
nix-env
and haven't seen any regressions.Motivation for this change
The changelog:
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.
-I/--include support
Attribute path completion now takes
-I
and--include
into account. This makes completion work correctly when doing things like this: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 itshttps://
form and resolved to a cache too.--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:
If the content of
default.nix
is{bar}: {foo = bar;}
then completing will result infoo
.--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
.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 aliasingnix-env
tonix-env -f '<nixpkgs>'
while still getting further--file
completion which can be used to override the default.--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.--help
and--version
completion to many commands--filter-system
will complete possible systems.--find-file
will no longer offer misleading file completionAnd a bunch of other small changes and fixes.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)