emacs: Add shell completions for 'guix refresh --type'.
* emacs/guix-pcomplete.el (guix-pcomplete-refresh-updaters): New function. (guix-pcomplete-complete-option-arg): Complete '-t/--type' option for 'guix refresh' command.
This commit is contained in:
parent
d9b9454c98
commit
b0e44d4f7d
@ -128,6 +128,13 @@ subcommands, actions, etc. for this guix COMMAND."
|
|||||||
guix-help-parse-regexp-group
|
guix-help-parse-regexp-group
|
||||||
"graph" "--list-types"))
|
"graph" "--list-types"))
|
||||||
|
|
||||||
|
(guix-memoized-defun guix-pcomplete-refresh-updaters ()
|
||||||
|
"Return a list of all available refresh updater types."
|
||||||
|
(guix-pcomplete-run-guix-and-search
|
||||||
|
guix-help-parse-list-regexp
|
||||||
|
guix-help-parse-regexp-group
|
||||||
|
"refresh" "--list-updaters"))
|
||||||
|
|
||||||
|
|
||||||
;;; Completing
|
;;; Completing
|
||||||
|
|
||||||
@ -287,9 +294,13 @@ INPUT is the current partially completed string."
|
|||||||
(option? "-u" "--user"))
|
(option? "-u" "--user"))
|
||||||
(complete* (pcmpl-unix-user-names)))
|
(complete* (pcmpl-unix-user-names)))
|
||||||
|
|
||||||
((and (command? "refresh")
|
((command? "refresh")
|
||||||
(option? "-s" "--select"))
|
(cond
|
||||||
|
((option? "-s" "--select")
|
||||||
(complete* guix-help-refresh-subsets))
|
(complete* guix-help-refresh-subsets))
|
||||||
|
((option? "-t" "--type")
|
||||||
|
(guix-pcomplete-complete-comma-args
|
||||||
|
(guix-pcomplete-refresh-updaters)))))
|
||||||
|
|
||||||
((and (command? "size")
|
((and (command? "size")
|
||||||
(option? "-m" "--map-file"))
|
(option? "-m" "--map-file"))
|
||||||
|
Loading…
Reference in New Issue
Block a user