diff mbox series

[bug#40060,2/2] gnu: youtube-dl: Add zsh completion

Message ID 20200314144221.17112-2-brice@waegenei.re
State Accepted
Headers show
Series youtube-dl add ffmpeg, pycryptodome and zsh-completion | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job

Commit Message

Brice Waegeneire March 14, 2020, 2:42 p.m. UTC
* gnu/packages/video.scm (youtube-dl)[arguments]: Add phase
install-completion.
---
 gnu/packages/video.scm | 9 +++++++++
 1 file changed, 9 insertions(+)
diff mbox series

Patch

diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm
index 4ca037532f..38f376c7e4 100644
--- a/gnu/packages/video.scm
+++ b/gnu/packages/video.scm
@@ -1582,6 +1582,15 @@  To load this plugin, specify the following option when starting mpv:
                           (("'share/")
                            (string-append "'" prefix "/share/")))
                         #t)))
+                  (add-after 'install 'install-completion
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (zsh (string-append out
+                                                 "/share/zsh/site-functions")))
+                        (mkdir-p zsh)
+                        (copy-file "youtube-dl.zsh"
+                                   (string-append zsh "/_youtube-dl"))
+                        #t)))
                   (add-after 'install 'wrap-executable
                     (lambda* (#:key inputs outputs #:allow-other-keys)
                       (let ((out (assoc-ref outputs "out"))