diff options
author | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2023-03-31 23:45:20 +0500 |
---|---|---|
committer | Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in> | 2023-03-31 23:47:58 +0500 |
commit | 02350e141d89bb1415f0452188dbab8aebdb3083 (patch) | |
tree | 8511f732ce9080bc8ee2ef912f4f90a021688f74 /eclass | |
parent | shell-completion.eclass: move EAPI guard (diff) | |
download | guru-02350e141d89bb1415f0452188dbab8aebdb3083.tar.gz guru-02350e141d89bb1415f0452188dbab8aebdb3083.tar.bz2 guru-02350e141d89bb1415f0452188dbab8aebdb3083.zip |
shell-completion.eclass: small fixes
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/shell-completion.eclass | 35 |
1 files changed, 14 insertions, 21 deletions
diff --git a/eclass/shell-completion.eclass b/eclass/shell-completion.eclass index 008c1c0a0..aa7c7bab7 100644 --- a/eclass/shell-completion.eclass +++ b/eclass/shell-completion.eclass @@ -2,14 +2,15 @@ # Distributed under the terms of the GNU General Public License v2 # @ECLASS: shell-completion.eclass -# @SUPPORTED_EAPIS: 6 7 8 +# @SUPPORTED_EAPIS: 8 +# @PROVIDES: bash-completion-r1 # @MAINTAINER: # Jonas Frei <freijon@pm.me> -# @BLURB: A few quick functions to install various shell completion files +# @BLURB: a few quick functions to install various shell completion files # @DESCRIPTION: -# This eclass provides a standardised way to install shell completions -# for popular shells. It inherits the already widely adopted -# `bash-completion-r1`, thus extending on its functionality. +# This eclass provides a standardised way to install shell completions +# for popular shells. It inherits the already widely adopted +# 'bash-completion-r1', thus extending on its functionality. case ${EAPI} in 8) ;; @@ -24,44 +25,36 @@ inherit bash-completion-r1 # @FUNCTION: _shell-completion_get_fishcompdir # @INTERNAL -# @DESCRIPTION: -# Get unprefixed fish completions directory +# @RETURN: unprefixed fish completions directory _shell-completion_get_fishcompdir() { - debug-print-function ${FUNCNAME} "${@}" - echo "/usr/share/fish/vendor_completions.d" } # @FUNCTION: _shell-completion_get_zshcompdir # @INTERNAL -# @DESCRIPTION: -# Get unprefixed zsh completions directory +# @RETURN: unprefixed zsh completions directory _shell-completion_get_zshcompdir() { - debug-print-function ${FUNCNAME} "${@}" - echo "/usr/share/zsh/site-functions" } # @FUNCTION: get_fishcompdir -# @DESCRIPTION: -# Get the fish completions directory. +# @RETURN: the fish completions directory (with EPREFIX) get_fishcompdir() { debug-print-function ${FUNCNAME} "${@}" - echo "${EPREFIX}$(_get_fishcompdir)" + echo "${EPREFIX}$(_shell-completion_get_fishcompdir)" } # @FUNCTION: get_zshcompdir -# @DESCRIPTION: -# Get the zsh completions directory. +# @RETURN: the zsh completions directory (with EPREFIX) get_zshcompdir() { debug-print-function ${FUNCNAME} "${@}" - echo "${EPREFIX}$(_get_zshcompdir)" + echo "${EPREFIX}$(_shell-completion_get_zshcompdir)" } # @FUNCTION: dofishcomp -# @USAGE: <file> [...] +# @USAGE: <file...> # @DESCRIPTION: # Install fish completion files passed as args. dofishcomp() { @@ -75,7 +68,7 @@ dofishcomp() { } # @FUNCTION: dozshcomp -# @USAGE: <file> [...] +# @USAGE: <file...> # @DESCRIPTION: # Install zsh completion files passed as args. dozshcomp() { |