feat(nix): add generic completing-read support to +nix/lookup-option

This commit is contained in:
Strikerlulu 2022-06-18 20:52:47 +05:30 committed by GitHub
parent a8dabe1aec
commit 1ed1064ce1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,8 +42,13 @@
:initial-input initial-input
:action #'+nix--options-action
:caller '+nix/options))
;; TODO Add general `completing-read' support
((user-error "No search engine is enabled. Enable helm or ivy!")))
((+nix--options-action (cdr
(assoc
(completing-read "NixOs options: "
nixos-options
nil
t
initial-input) nixos-options)))))
;; Tell lookup module to let us handle things from here
'deferred)