gnu: git: Install zsh completions and git-prompt.

* gnu/packages/version-control.scm (git)[#:phases]<install-shell-completion>:
Also install git-prompt and zsh _git site function.

Signed-off-by: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Change-Id: I76c45e117715a13db96ef0dda4ad6ea9af3a1882
This commit is contained in:
Liliana Marie Prikler 2023-09-23 21:43:07 +02:00 committed by Ludovic Courtès
parent bd20ad3eb2
commit 6da03fcc45
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -425,13 +425,16 @@ (define PATH-variable-definition
"t/t9141-git-svn-multiple-branches.sh")))))
(add-after 'install 'install-shell-completion
(lambda _
(let ((completions (string-append #$output
"/etc/bash_completion.d")))
;; TODO: Install the tcsh and zsh completions in the right
;; place.
(mkdir-p completions)
(let ((bash (string-append #$output "/etc/bash_completion.d"))
(zsh (string-append #$output "/share/zsh/site-functions")))
;; TODO: Install the tcsh completions in the right place.
(for-each mkdir-p (list bash zsh))
(copy-file "contrib/completion/git-completion.bash"
(string-append completions "/git")))))
(string-append bash "/git"))
(copy-file "contrib/completion/git-prompt.sh"
(string-append #$output "/bin/git-prompt"))
(copy-file "contrib/completion/git-completion.zsh"
(string-append zsh "/_git")))))
(add-after 'install 'remove-unusable-perl-commands
(lambda _
(let ((bin (string-append #$output "/bin"))