elisp: Support new options for "guix pack"

Which were added by:
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=fd214f1522063905021a297dab1ac4d85d94ad83> and
<http://git.savannah.gnu.org/cgit/guix.git/commit/?id=a0f352b30f4869a7af7017b8a5011ac7602dd115>.

* elisp/guix-command.el (guix-command-improve-pack-argument): Use "P"
  for "--entry-point" ("e" is for "--expression").
  Complete file name for "--root".
* elisp/guix-pcomplete.el (guix-pcomplete-complete-option-arg): Likewise.
This commit is contained in:
Alex Kost 2019-07-26 18:56:24 +03:00
parent 65bd49b3a2
commit 07dc656403
2 changed files with 7 additions and 4 deletions

View File

@ -290,8 +290,10 @@ to be modified."
(guix-command-define-argument-improver
guix-command-improve-pack-argument
'(("--compression" :fun guix-read-compressor-name)
("--entry-point" :char ?P)
("--format" :fun guix-read-pack-format-name)
("--localstatedir" :char ?L)
("--root" :fun guix-read-file-name)
("--save-provenance" :char ?p)
;; "--symlink" is not completed as it should be "FILE-NAME=TARGET".
;; ("--symlink" :fun guix-read-file-name)

View File

@ -278,10 +278,11 @@ INPUT is the current partially completed string."
(complete* (guix-compressor-names)))
((option? "-f" "--format")
(complete* (guix-pack-format-names)))
;; Although the argument should be "FILE-NAME=TARGET", it is
;; still better to complete the FILE-NAME than to complete
;; nothing.
((option? "-S" "--symlink")
;; Although the argument for "--symlink" should be
;; "FILE-NAME=TARGET", it is still better to complete FILE-NAME
;; than to complete nothing.
((or (option? "-r" "--root")
(option? "-S" "--symlink"))
(complete* (pcomplete-entries)))))
((command? "potluck")