GNU bug report logs - #66171
[PATCH] gnu: git: Install shell completions.

Previous Next

Package: guix-patches;

Reported by: Liliana Marie Prikler <liliana.prikler <at> gmail.com>

Date: Sat, 23 Sep 2023 19:46:02 UTC

Severity: normal

Tags: patch

Done: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Subject: bug#66171: closed (Re: [bug#66171] [PATCH v3] gnu: git: Install
 zsh completions and git-prompt.)
Date: Tue, 10 Oct 2023 03:34:02 +0000
[Message part 1 (text/plain, inline)]
Your bug report

#66171: [PATCH] gnu: git: Install shell completions.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to 66171 <at> debbugs.gnu.org.

-- 
66171: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=66171
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Maxim Cournoyer <maxim.cournoyer <at> gmail.com>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
Cc: Efraim Flashner <efraim <at> flashner.co.il>, 66171-done <at> debbugs.gnu.org,
 Simon Tournier <zimon.toutoune <at> gmail.com>
Subject: Re: [bug#66171] [PATCH v3] gnu: git: Install zsh completions and
 git-prompt.
Date: Mon, 09 Oct 2023 23:33:15 -0400
Hello,

Liliana Marie Prikler <liliana.prikler <at> gmail.com> writes:

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

Applied to core-updates, after resolving the conflict.

-- 
Thanks,
Maxim

[Message part 3 (message/rfc822, inline)]
From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: guix-patches <at> gnu.org
Subject: [PATCH] gnu: git: Install shell completions.
Date: Sat, 23 Sep 2023 21:43:07 +0200
* gnu/packages/version-control.scm (git)[outputs]: Add “completion”.
[#:phases]: Add ‘install-completion’.
---
 gnu/packages/version-control.scm | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm
index 9716a6f27a..54b2ed74fb 100644
--- a/gnu/packages/version-control.scm
+++ b/gnu/packages/version-control.scm
@@ -303,6 +303,7 @@ (define-public git
                "credential-netrc"       ; git-credential-netrc
                "credential-libsecret"   ; git-credential-libsecret
                "subtree"                ; git-subtree
+               "completion"             ; git-completion and git-prompt
                "gui"))                  ; gitk, git gui
     (arguments
      `(#:make-flags `("V=1"             ;more verbose compilation
@@ -482,6 +483,20 @@ (define-public git
                              (string-append subtree "/bin"))
                (install-file "contrib/subtree/git-subtree.1"
                              (string-append subtree "/share/man/man1")))))
+         (add-after 'install 'install-completion
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let ((completion (assoc-ref outputs "completion")))
+               (define (install-as file storename)
+                 (let ((storename (string-append completion storename)))
+                   (mkdir-p (dirname storename))
+                   (copy-file file storename)))
+               (with-directory-excursion "contrib/completion"
+                 (for-each (cut apply install-as <>)
+                           `(("git-prompt.sh" "/bin/git-prompt")
+                             ("git-completion.bash"
+                              "/share/bash-completion/completions/_git")
+                             ("git-completion.zsh"
+                              "/share/zsh/site-functions/_git")))))))
          (add-after 'install 'restore-sample-hooks-shebang
            (lambda* (#:key outputs #:allow-other-keys)
              (let* ((out (assoc-ref outputs "out"))

base-commit: 4f35ff1275e05be31f5d41464ccf147e9dbfd016
prerequisite-patch-id: ee5d7299c5790d77e0d409f34165063fcff10a8b
-- 
2.41.0




This bug report was last modified 1 year and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.