jupyter: add completion
Closes #37419. Signed-off-by: FX Coudert <fxcoudert@gmail.com>
This commit is contained in:
parent
b4968ca865
commit
f00209f6fe
1 changed files with 9 additions and 0 deletions
|
@ -283,6 +283,12 @@ class Jupyter < Formula
|
|||
|
||||
# remove bundled kernel
|
||||
rm_rf Dir["#{libexec}/share/jupyter/kernels"]
|
||||
|
||||
# install completion
|
||||
resource("jupyter_core").stage do
|
||||
bash_completion.install "examples/jupyter-completion.bash" => "jupyter"
|
||||
zsh_completion.install "examples/completions-zsh" => "_jupyter"
|
||||
end
|
||||
end
|
||||
|
||||
def caveats; <<~EOS
|
||||
|
@ -314,5 +320,8 @@ class Jupyter < Formula
|
|||
EOS
|
||||
system bin/"jupyter-nbconvert", "nbconvert.ipynb"
|
||||
assert_predicate testpath/"nbconvert.html", :exist?, "Failed to export HTML"
|
||||
|
||||
assert_match "-F _jupyter",
|
||||
shell_output("source #{bash_completion}/jupyter && complete -p jupyter")
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue