READER in magit options takes two arguments instead of one
Silex opened this issue · comments
Philippe Vaucher commented
Hello,
Not sure if this is a bug or a documentation fix but:
READER is used to read a value from the user when the option is
invoked and does not currently have a value. It should take one
argument and use it as the prompt. If this is nil, then
`read-from-minibuffer' is used.
Yet in practice only the following works:
(magit-define-popup docker-compose
"Popup for docker-compose."
'docker-compose
:man-page "docker-compose"
:switches '((?a "No ANSI" "--no-ansi")
(?c "Compatibility" "--compatibility")
(?v "Verbose" "--verbose"))
:options `((?d "Project directory" "--project-directory " docker-utils-read-directory-name)
(...snip...)
(defun docker-utils-read-directory-name (prompt _ignore)
"Wrapper around `read-directory-name'."
(read-directory-name "Directory: "))
With _ignore
being nil
. If I use one argument only then argument error, etc.
Is the documentation wrong and it's called with two args or is the calling wrong?
Philippe Vaucher commented
Thanks! 👍