mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-28 00:51:41 +02:00
eclass/shell-completion: Sync with Gentoo
It's from Gentoo commit c8af7eb1285a2683460618b71e2e9a14ca6badcd.
This commit is contained in:
parent
84e553ea0a
commit
4ed458d3e8
@ -1,4 +1,4 @@
|
|||||||
# Copyright 2023 Gentoo Authors
|
# Copyright 2023-2024 Gentoo Authors
|
||||||
# Distributed under the terms of the GNU General Public License v2
|
# Distributed under the terms of the GNU General Public License v2
|
||||||
|
|
||||||
# @ECLASS: shell-completion.eclass
|
# @ECLASS: shell-completion.eclass
|
||||||
@ -20,7 +20,7 @@ case ${EAPI} in
|
|||||||
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported"
|
*) die "${ECLASS}: EAPI ${EAPI:-0} not supported"
|
||||||
esac
|
esac
|
||||||
|
|
||||||
if [[ ! ${_SHELL_COMPLETION_ECLASS} ]]; then
|
if [[ -z ${_SHELL_COMPLETION_ECLASS} ]]; then
|
||||||
_SHELL_COMPLETION_ECLASS=1
|
_SHELL_COMPLETION_ECLASS=1
|
||||||
|
|
||||||
# Extend bash-completion-r1
|
# Extend bash-completion-r1
|
||||||
@ -43,7 +43,7 @@ _shell-completion_get_zshcompdir() {
|
|||||||
# @FUNCTION: get_fishcompdir
|
# @FUNCTION: get_fishcompdir
|
||||||
# @RETURN: the fish completions directory (with EPREFIX)
|
# @RETURN: the fish completions directory (with EPREFIX)
|
||||||
get_fishcompdir() {
|
get_fishcompdir() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
echo "${EPREFIX}$(_shell-completion_get_fishcompdir)"
|
echo "${EPREFIX}$(_shell-completion_get_fishcompdir)"
|
||||||
}
|
}
|
||||||
@ -51,7 +51,7 @@ get_fishcompdir() {
|
|||||||
# @FUNCTION: get_zshcompdir
|
# @FUNCTION: get_zshcompdir
|
||||||
# @RETURN: the zsh completions directory (with EPREFIX)
|
# @RETURN: the zsh completions directory (with EPREFIX)
|
||||||
get_zshcompdir() {
|
get_zshcompdir() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
echo "${EPREFIX}$(_shell-completion_get_zshcompdir)"
|
echo "${EPREFIX}$(_shell-completion_get_zshcompdir)"
|
||||||
}
|
}
|
||||||
@ -61,7 +61,7 @@ get_zshcompdir() {
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Install fish completion files passed as args.
|
# Install fish completion files passed as args.
|
||||||
dofishcomp() {
|
dofishcomp() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
(
|
(
|
||||||
insopts -m 0644
|
insopts -m 0644
|
||||||
@ -75,7 +75,7 @@ dofishcomp() {
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Install zsh completion files passed as args.
|
# Install zsh completion files passed as args.
|
||||||
dozshcomp() {
|
dozshcomp() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
(
|
(
|
||||||
insopts -m 0644
|
insopts -m 0644
|
||||||
@ -89,7 +89,7 @@ dozshcomp() {
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Install fish file under a new name.
|
# Install fish file under a new name.
|
||||||
newfishcomp() {
|
newfishcomp() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
(
|
(
|
||||||
insopts -m 0644
|
insopts -m 0644
|
||||||
@ -103,7 +103,7 @@ newfishcomp() {
|
|||||||
# @DESCRIPTION:
|
# @DESCRIPTION:
|
||||||
# Install zsh file under a new name.
|
# Install zsh file under a new name.
|
||||||
newzshcomp() {
|
newzshcomp() {
|
||||||
debug-print-function ${FUNCNAME} "${@}"
|
debug-print-function ${FUNCNAME} "$@"
|
||||||
|
|
||||||
(
|
(
|
||||||
insopts -m 0644
|
insopts -m 0644
|
||||||
|
Loading…
x
Reference in New Issue
Block a user