gnu: git: Install the Bash completion script.
* gnu/packages/version-control.scm (git)[arguments]: Add 'install-shell-completion' phase.
This commit is contained in:
		
							parent
							
								
									776463ba9f
								
							
						
					
					
						commit
						23c0e74375
					
				
					 1 changed files with 62 additions and 52 deletions
				
			
		| 
						 | 
				
			
			@ -146,6 +146,16 @@ as well as the classic centralized workflow.")
 | 
			
		|||
            (("/bin/sh") (which "sh"))
 | 
			
		||||
            (("/usr/bin/perl") (which "perl"))
 | 
			
		||||
            (("/usr/bin/python") (which "python"))))
 | 
			
		||||
        (alist-cons-after
 | 
			
		||||
         'install 'install-shell-completion
 | 
			
		||||
         (lambda* (#:key outputs #:allow-other-keys)
 | 
			
		||||
           (let* ((out         (assoc-ref outputs "out"))
 | 
			
		||||
                  (completions (string-append out "/etc/bash_completion.d")))
 | 
			
		||||
             ;; TODO: Install the tcsh and zsh completions in the right place.
 | 
			
		||||
             (mkdir-p completions)
 | 
			
		||||
             (copy-file "contrib/completion/git-completion.bash"
 | 
			
		||||
                        (string-append completions "/git.sh"))
 | 
			
		||||
             #t))
 | 
			
		||||
         (alist-cons-after
 | 
			
		||||
          'install 'split
 | 
			
		||||
          (lambda* (#:key inputs outputs #:allow-other-keys)
 | 
			
		||||
| 
						 | 
				
			
			@ -203,7 +213,7 @@ as well as the classic centralized workflow.")
 | 
			
		|||
              (wrap-program (string-append out "/bin/git")
 | 
			
		||||
                `("PATH" ":" prefix
 | 
			
		||||
                  ("$HOME/.guix-profile/libexec/git-core")))))
 | 
			
		||||
         %standard-phases))))
 | 
			
		||||
          %standard-phases)))))
 | 
			
		||||
   (synopsis "Distributed version control system")
 | 
			
		||||
   (description
 | 
			
		||||
    "Git is a free distributed version control system designed to handle
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Reference in a new issue