mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: bash-completion: Remove completions redundant with those of util-linux.
* gnu/packages/bash.scm (bash-completion)[arguments]: New field.
This commit is contained in:
parent
ee8591990f
commit
b16b77905c
1 changed files with 24 additions and 0 deletions
|
@ -23,6 +23,7 @@
|
||||||
#:use-module (gnu packages ncurses)
|
#:use-module (gnu packages ncurses)
|
||||||
#:use-module (gnu packages readline)
|
#:use-module (gnu packages readline)
|
||||||
#:use-module (gnu packages bison)
|
#:use-module (gnu packages bison)
|
||||||
|
#:use-module (gnu packages linux)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
#:use-module (guix download)
|
#:use-module (guix download)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
|
@ -247,6 +248,29 @@ without modification.")
|
||||||
(patches
|
(patches
|
||||||
(list (search-patch "bash-completion-directories.patch")))))
|
(list (search-patch "bash-completion-directories.patch")))))
|
||||||
(build-system gnu-build-system)
|
(build-system gnu-build-system)
|
||||||
|
(native-inputs `(("util-linux" ,util-linux)))
|
||||||
|
(arguments
|
||||||
|
`(#:phases (alist-cons-after
|
||||||
|
'install 'remove-redundant-completions
|
||||||
|
(lambda* (#:key inputs outputs #:allow-other-keys)
|
||||||
|
;; Util-linux comes with a bunch of completion files for
|
||||||
|
;; its own commands which are more sophisticated and
|
||||||
|
;; up-to-date than those of bash-completion. Remove those
|
||||||
|
;; from bash-completion.
|
||||||
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
|
(util-linux (assoc-ref inputs "util-linux"))
|
||||||
|
(completions (string-append out
|
||||||
|
"/share/bash-completion"
|
||||||
|
"/completions"))
|
||||||
|
(already (find-files (string-append util-linux
|
||||||
|
"/etc/bash_completion.d"))))
|
||||||
|
(with-directory-excursion completions
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(when (file-exists? file)
|
||||||
|
(delete-file file)))
|
||||||
|
(map basename already)))
|
||||||
|
#t))
|
||||||
|
%standard-phases)))
|
||||||
(synopsis "Bash completions for common commands")
|
(synopsis "Bash completions for common commands")
|
||||||
(description
|
(description
|
||||||
"This package provides extensions that allow Bash to provide adapted
|
"This package provides extensions that allow Bash to provide adapted
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue