aboutsummaryrefslogtreecommitdiff
path: root/etc/completion/bash
AgeCommit message (Collapse)Author
2022-05-29bash completion: Fix & unify option parsing.Tobias Geerinckx-Rice
We now correctly recognise ‘guix -Abcdef’ as equivalent to ‘guix -f’. * etc/completion/bash/guix (_guix_is_short_option, guix_is_long_option): New functions. (_guix_is_dash_f, _guix_is_dash_l, _guix_is_dash_L, _guix_is_dash_m) (_guix_is_dash_C, _guix_is_dash_p): Use them.
2022-01-17bash completion: Complete "guix home" sub-commands.Ludovic Courtès
* etc/completion/bash/guix (_guix_complete): Treat "guix home" like "guix system".
2022-01-16bash completion: Fix options completion.Fulbert
Fixes, for example, "guix import pypi --<TAB>", which would previously fail to show '--recursive'. * etc/completion/bash/guix (_guix_complete_option): Fix options completion for first subcommand. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-08bash completion: Complete ‘guix shell -f’.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete): Suggest a file name following ‘guix shell […] -f’.
2021-10-31bash completion: Complete top-level options.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete_option): Fix operation without a {,sub}command. (_guix_complete): Call it also when no command is given.
2021-10-31bash completion: Don't hard-code "guix" binary name.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete_command): Use ${COMP_WORDS[0]} instead of hard-coding "guix".
2021-10-25Add 'guix shell'.Ludovic Courtès
* guix/scripts/shell.scm, tests/guix-shell.sh: New files. * Makefile.am (MODULES): Add 'shell.scm'. (SH_TESTS): Add 'tests/guix-shell.sh'. * guix/scripts/environment.scm (show-environment-options-help): New procedure. (show-help): Use it. (guix-environment*): New procedure. (guix-environment): Use it. * po/guix/POTFILES.in: Add it. * doc/guix.texi (Features): Refer to "guix shell" (Invoking guix package): Likewise. (Development): Likewise. (Invoking guix shell): New node. (Invoking guix environment): Add deprecation warning. (Debugging Build Failures): Use 'guix shell' in examples. (Invoking guix container): Refer to 'guix shell'. (Invoking guix processes, Virtualization Services): Adjust examples to use 'guix shell'. * doc/contributing.texi (Building from Git): Refer to 'guix shell'. * etc/completion/bash/guix: Handle "shell".
2021-10-03bash completion: Fix ‘system’ & ‘container’ subcommands.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete): Count words from the innermost command.
2021-10-03bash completion: Complete ‘guix size’ file names.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete): Complete store file names after the ‘size’ command.
2021-10-03bash completion: Complete ‘guix build’ file names.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete_available_package_or_store_file): New function. (_guix_complete): Call it in place of _guix_complete_available_package after the ‘build’ command.
2021-10-03bash completion: Complete ‘guix weather’ packages.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete): Complete available package names for ‘guix weather’ when not following ‘-m’.
2021-10-03bash completion: Append to $COMPREPLY where possible.Tobias Geerinckx-Rice
_guix_complete is always called with a fresh empty array. * etc/completion/bash/guix (_guix_complete_command) (_guix_complete_subcommand, _guix_complete_installed_package) (_guix_complete_option, _guix_complete_pid): Append to $COMPREPLY rather than re-assigning.
2021-10-03bash completion: Consolidate similar $command ‘if’ branches.Tobias Geerinckx-Rice
* etc/completion/bash/guix (_guix_complete): Combine the ‘upgrade’ and ‘remove’ commands, as well as ‘download’, ‘gc’, and ‘hash’.
2021-06-16bash_completion: Complete options for ‘guix environment’.Tobias Geerinckx-Rice
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.
2021-06-16bash completion: Complete options for the right command.Tobias Geerinckx-Rice
* 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.
2021-06-16bash completion: Really support subcommands.Tobias Geerinckx-Rice
* 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.
2020-12-04bash completion: Complete file names after '-f' and '-l'.Ludovic Courtès
* etc/completion/bash/guix (_guix_is_dash_f, _guix_is_dash_l): New functions. (_guix_complete): Complete file names after 'guix package -f', 'guix build -f', and 'guix environment -l'.
2020-09-24bash completion: Adjust to new 'guix help' output.Ludovic Courtès
This is a followup to 3794ce93be8216d8378df7b808ce7f53b1e05a53, 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 3794ce93be8216d8378df7b808ce7f53b1e05a53.
2020-09-21bash completion: Complete file names after 'guix package -p'.Fulbert
* etc/completion/bash/guix (_guix_complete): Add _guix_is_dash_p. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-09-10bash completion: Restore completion for 'guix system', etc.Ludovic Courtès
Commit 538ca8dd65f0075cc65bcca18ed87f66a789290a 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.
2020-06-27bash completion: Complete 'guix environment' properly.Ludovic Courtès
* etc/completion/bash/guix (_guix_complete): Add case for "guix environment".
2020-06-04bash completion: Complete sub-commands after 'guix time-machine'.Ludovic Courtès
* etc/completion/bash/guix (_guix_complete_subcommand): New function. (_guix_complete): Use it. For "time-machine", call '_guix_complete_subcommand' by default.
2020-06-04bash completion: Complete file names after '-p' and '-C'.Ludovic Courtès
* 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".
2020-02-14guix build: Add '--manifest' option.Marius Bakke
* 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.
2019-04-29guix package: Add 'install', 'remove', and 'upgrade' aliases.Ludovic Courtès
* guix/scripts/install.scm, guix/scripts/remove.scm, guix/scripts/upgrade.scm, tests/guix-package-aliases.sh: New files. * Makefile.am (MODULES, SH_TESTS): Add them. * po/guix/POTFILES.in: Add them. * guix/scripts/package.scm (guix-package): Split with... (guix-package*): ... this. New procedure. * doc/guix.texi (Invoking guix package): Document them. (Binary Installation, Application Setup, Package Management) (Packages with Multiple Outputs, Package Modules) (X.509 Certificates, Installing Debugging Files): Use 'guix install' in simple examples. * etc/completion/bash/guix (_guix_complete): Handle "install", "remove", and "upgrade".
2018-11-06bash completion: Restore completion of available packages for 'guix build'.Ludovic Courtès
Fixes a regression introduced in 9b0a755f642542dd96065ad05ec9d844d8077fd7 whereby 'guix build TAB' would not suggest any completion. * etc/completion/bash/guix (_guix_complete): Arrange so 'guix build TAB' completes available packages.
2018-07-03bash completion: Complete files names after 'guix weather -m'.Oleg Pykhalov
* etc/completion/bash/guix (_guix_complete): Complete files names after 'guix weather -m'.
2018-07-03bash completion: Complete files names after 'guix build -L'.Oleg Pykhalov
* etc/completion/bash/guix (_guix_complete): Complete files names after 'guix build -L'.
2018-06-16Add guix-daemon Bash completion file.Oleg Pykhalov
* etc/completion/bash/guix-daemon: New file. * Makefile.am (dist_bashcompletion_DATA): Add this.
2018-02-17bash completion: Complete files names after 'guix package -m'.Oleg Pykhalov
* etc/completion/bash/guix (_guix_is_dash_m): New function. (_guix_complete): Add this.
2017-08-22bash completion: Complete files names after 'guix download'.Marius Bakke
* etc/completion/bash/guix (_guix_complete): When the command is "download", use __guix_complete_file.
2017-02-07bash completion: Complete subcommands for the current word.Ludovic Courtès
* etc/completion/bash/guix (_guix_complete_subcommand): Refer to the $COMP_CWORD element instead of the last element.
2017-02-07bash completion: Properly complete 'guix container exec'.Ludovic Courtès
* etc/completion/bash/guix (_guix_complete_pid): New function. (_guix_complete): Add case for "container".
2017-02-07bash completion: Complete file names after 'guix system COMMAND'.Ludovic Courtès
* etc/completion/bash/guix (_guix_complete): When the command is "system" and $COMP_CWORD > 2, use _guix_complete_file.
2017-02-07bash completion: Complete 'guix gc' with file names.Ludovic Courtès
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'.
2016-09-07bash completion: Complete subcommands and their options.Ludovic Courtès
* 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".
2016-09-07bash completion: Redirect 'guix' stderr to /dev/null.Ludovic Courtès
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'.
2015-08-20bash completion: Cache the list of subcommands and available packages.Ludovic Courtès
* 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.
2015-05-01bash completion: Complete long options with no short variant.Ludovic Courtès
* etc/completion/bash/guix (_guix_complete_option): Change grep regexp to match options that don't have a short option name.
2015-04-09Add Bash completion file.Ludovic Courtès
* etc/completion/bash/guix: New file. * Makefile.am (dist_bashcompletion_DATA): New variable. * configure.ac: Add --with-bash-completion-dir.