Commit 60a3e5c7 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

kernel: Fix completion of magic commands.

Until now, ";;guix d<TAB>" would always return the whole list of magic
commands instead of returning just "describe" and "download".

* guix-jupyter-kernel.scm (reply-complete-request): Filter
%MAGIC-COMMANDS whose prefix is COMMAND.
parent 0062a5fa
......@@ -622,7 +622,8 @@ Return STATE."
;; This is a completion request on a ";;guix" magic.
(match (string-split (string-take first cursor) #\space)
((";;guix" command)
(send-completion-reply %magic-commands
(send-completion-reply (filter (cut string-prefix? command <>)
(- cursor (string-length command))
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment