From d824cfbabeb0780c9ea7a6dab02c47b6a4d029c6 Mon Sep 17 00:00:00 2001
From: Ludovic Courtès <ludo@gnu.org>
Date: Sat, 27 Apr 2019 18:04:00 +0200
Subject: guix package: Add 'install', 'remove', and 'upgrade' aliases.

* 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".
---
 etc/completion/bash/guix | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

(limited to 'etc/completion')

diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix
index 3d2b3ddda7..edfb627e87 100644
--- a/etc/completion/bash/guix
+++ b/etc/completion/bash/guix
@@ -1,5 +1,5 @@
 # GNU Guix --- Functional package management for GNU
-# Copyright © 2015, 2016, 2017, 2018 Ludovic Courtès <ludo@gnu.org>
+# Copyright © 2015, 2016, 2017, 2018, 2019 Ludovic Courtès <ludo@gnu.org>
 #
 # This file is part of GNU Guix.
 #
@@ -167,6 +167,15 @@ _guix_complete ()
 		else
 		    _guix_complete_available_package "$word_at_point"
 		fi
+	    elif _guix_is_command "install"
+	    then
+		_guix_complete_available_package "$word_at_point"
+	    elif _guix_is_command "remove"
+	    then
+		_guix_complete_installed_package "$word_at_point"
+	    elif _guix_is_command "upgrade"
+	    then
+		_guix_complete_installed_package "$word_at_point"
             elif _guix_is_command "build"
             then
                 if _guix_is_dash_L
-- 
cgit v1.2.3