Note that there are still plenty of bugs that this series didn't fix,
e.g.:
$ guix time-machine -- system reconf<Tab>
* etc/completion/bash/guix (_guix_complete): Call _guix_complete_option
if the word at point looks like an option.
* etc/completion/bash/guix (_guix_complete_option): Receive two
arguments and complete the second based on the first, instead
of blindly completing the very last word based on the very first
(sub)command.
(_guix_complete): Adjust both calls.
* etc/completion/bash/guix (_guix_is_option): New function.
(_guix_is_command): Remove function to replace it with simple string
comparison…
(_guix_complete): …here. Complete the ‘innermost’ command at point.
This importer has suffered from bitrot and no longer works with current
Nix and Nixpkgs. See <https://bugs.gnu.org/32339> and
<https://bugs.gnu.org/36255>.
* guix/import/snix.scm, guix/scripts/import/nix.scm,
tests/snix.scm: Remove.
* Makefile.am (MODULES, SCM_TESTS): Remove them.
* guix/scripts/import.scm (importers): Remove "nix".
* build-aux/test-env.in: Remove NIXPKGS variable.
* configure.ac: Remove '--with-nixpkgs' option.
* doc/guix.texi (Invoking guix import): Remove bit about "guix import
nix".
* etc/completion/fish/guix.fish: Likewise.
Remove the 'vm-image' command that has been superseded by the 'image'
command.
* gnu/system/vm.scm (system-qemu-image): Remove it.
* guix/scripts/system.scm (system-derivation-for-action): Mark 'vm-image'
command as deprecated and use the image API to produce the VM image.
(perform-action, show-help): Adapt accordingly.
* tests/guix-system.sh: Ditto.
* doc/guix.texi (Invoking guix system,
Running Guix in a VM): Ditto.
* etc/completion/fish/guix.fish: Ditto.
* etc/completion/zsh/_guix: Ditto.
This is a followup to 3794ce93be, which
broke command completion.
Reported by Oleg Pykhalov <go.wigust@gmail.com>.
* etc/completion/bash/guix (_guix_complete_command): Update to match
output of 'guix help' as introduced in
3794ce93be.
Commit 538ca8dd65 introduced a second
'_guix_complete_subcommand' function, shadowing the existing one, which
broke sub-command completion for 'guix system', 'guix import', etc.
* etc/completion/bash/guix: Distinguish between '_guix_complete_command'
and '_guix_complete_subcommand'. Adjust users to call the right one.
* etc/completion/bash/guix (_guix_complete_subcommand): New function.
(_guix_complete): Use it. For "time-machine", call
'_guix_complete_subcommand' by default.
* etc/completion/bash/guix (_guix_is_dash_C, _guix_is_dash_p): New functions.
(_guix_complete): Honor them for "install", "remove", "upgrade", "pull",
and "time-machine".
* guix/scripts/build.scm (show-help): Document --manifest argument.
(options->things-to-build): When given a manifest, evaluate all the entries.
* tests/guix-build.sh: Add test for --manifest.
* doc/guix.texi (Additional Build Options): Mention --manifest.
* etc/completion/bash/guix: Complete file name if 'guix build' argument is
-m.
This is a followup to bc69ea2d60.
* guix/scripts/build.scm (show-build-options-help): Rename
"--no-build-hook" to "--no-offload".
(%standard-build-options): Likewise, and warn when "--no-build-hook" is
passed.
* nix/nix-daemon/guix-daemon.cc (options): Add "--no-offload" and mark
"--no-build-hook" as hidden.
* guix/scripts/offload.scm: Adjust comment.
* doc/guix.texi (Invoking guix-daemon, Common Build Options): Replace
"--no-build-hook" with "--no-offload".
* etc/completion/fish/guix.fish, etc/completion/zsh/_guix: Adjust
accordingly.
Fixes a regression introduced in
9b0a755f64 whereby 'guix build TAB' would
not suggest any completion.
* etc/completion/bash/guix (_guix_complete): Arrange so 'guix build TAB'
completes available packages.
* etc/completion/fish/guix.fish: New file.
* Makefile.am: Register the file.
* configure.ac: Add the fish vendor-completions directory.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Reported by a couple of cool folks at a bar in Brussels.
* etc/completion/bash/guix (_guix_complete): Use '_guix_complete_file'
for 'guix gc'. This fixes completion of 'guix gc -d'.
* etc/completion/bash/guix (_guix_complete_subcommand): New function.
(_guix_complete_option): Allow completion of subcommand options.
(_guix_complete): Use '_guix_complete_subcommand' for "system" and
"import".
This avoids spurious messages when pressing TAB.
* etc/completion/bash/guix (_guix_complete_available_package)
(_guix_complete_installed_package, _guix_complete_option)
(_guix_complete): Redirect stderr to /dev/null when running 'guix'.
* etc/completion/bash/guix (_guix_complete_available_package): Cache the list
of available packages in '_guix_available_packages' and use it.
(_guix_complete): Cache the list of subcommands in '_guix_subcommands' and
use it.