diff options
| author | Alex Kost <alezost@gmail.com> | 2017-03-22 16:32:47 +0300 |
|---|---|---|
| committer | Alex Kost <alezost@gmail.com> | 2017-03-22 16:32:47 +0300 |
| commit | b09805ea51177ec75d4a630e8fc535590d1d2755 (patch) | |
| tree | 79b004f6d2a24092db2f15505be0c11c1cab0d0e | |
| parent | elisp: Add support for "--format" option of "guix pack" command (diff) | |
| download | guix-wigust-b09805ea51177ec75d4a630e8fc535590d1d2755.tar.gz | |
elisp: Add support for "--{public/private}-key" options of "guix publish" command
Follow the changes introduced by
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=46f58390cb5a01d6cb59070e8e76e9a78e9b933e>.
* elisp/guix-command.el (guix-command-improve-publish-argument): New
variable and function.
(guix-command-argument-improvers): Add it.
* elisp/guix-pcomplete.el (guix-pcomplete-complete-option-arg): Complete
file names for "--public-key" and "private-key" options.
| -rw-r--r-- | elisp/guix-command.el | 7 | ||||
| -rw-r--r-- | elisp/guix-pcomplete.el | 9 |
2 files changed, 13 insertions, 3 deletions
diff --git a/elisp/guix-command.el b/elisp/guix-command.el index 4664ac1..209487b 100644 --- a/elisp/guix-command.el +++ b/elisp/guix-command.el @@ -274,6 +274,11 @@ to be modified." ("--show" :char ?h :fun guix-read-package-name))) (guix-command-define-argument-improver + guix-command-improve-publish-argument + '(("--public-key" :char ?k :fun guix-read-file-name) + ("--private-key" :char ?K :fun guix-read-file-name))) + +(guix-command-define-argument-improver guix-command-improve-refresh-argument '(("--select" :fun guix-read-refresh-subset) ("--type" :fun guix-read-refresh-updater-names-string) @@ -338,6 +343,8 @@ to be modified." guix-command-improve-common-build-argument guix-command-improve-search-paths-argument guix-command-improve-package-argument) + (("publish") + guix-command-improve-publish-argument) (("refresh") guix-command-improve-key-policy-argument guix-command-improve-refresh-argument) diff --git a/elisp/guix-pcomplete.el b/elisp/guix-pcomplete.el index 0babdb1..da3e244 100644 --- a/elisp/guix-pcomplete.el +++ b/elisp/guix-pcomplete.el @@ -254,9 +254,12 @@ INPUT is the current partially completed string." ((option? "-S" "--symlink") (complete* (pcomplete-entries))))) - ((and (command? "publish") - (option? "-u" "--user")) - (complete* (pcmpl-unix-user-names))) + ((command? "publish") + (cond + ((member option '("--public-key" "--private-key")) + (complete* (pcomplete-entries))) + ((option? "-u" "--user") + (complete* (pcmpl-unix-user-names))))) ((command? "refresh") (cond |
