Skip to content

Commit

Permalink
add bash completion file
Browse files Browse the repository at this point in the history
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
  • Loading branch information
arthurzam committed Jun 6, 2024
1 parent 214bea5 commit fd7c4dc
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 1 deletion.
47 changes: 47 additions & 0 deletions data/share/bash-completion/completions/pycargoebuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License, v2 or later

_pycargoebuild() {
local i cur prev
_get_comp_words_by_ref cur prev

local OPTS=(
-h --help -c --crate-tarball --crate-tarball-path --crate-tarball-prefix
-d --distdir -f --force -F --fetcher -i --input --inplace --no-config
-l --license-mapping -L --no-license -M --no-manifest -o --output
)

case ${prev} in
--crate-tarball-prefix)
COMPREPLY=()
return 0
;;
--crate-tarball-path)
_filedir
return 0
;;
-i|--input|--inplace|-o|--output)
_filedir 'ebuild'
return 0
;;
-d|--distdir)
_filedir -d
return 0
;;
-l|--license-mapping)
_filedir
return 0
;;
-F|--fetcher)
COMPREPLY=($(compgen -W 'auto aria2 wget' -- "${cur}"))
return 0
;;
esac

if [[ ${cur} == -* ]]; then
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "${cur}") )
else
_filedir -d
fi
} &&
complete -F _pycargoebuild pycargoebuild
Binary file added dist/pycargoebuild-0.13.2-py3-none-any.whl
Binary file not shown.
Binary file added dist/pycargoebuild-0.13.2.tar.gz
Binary file not shown.
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[build-system]
requires = ["flit_core >=3.2,<4"]
requires = ["flit_core >=3.7,<4"]
build-backend = "flit_core.buildapi"

[project]
Expand Down Expand Up @@ -29,6 +29,9 @@ pycargoebuild = "pycargoebuild.__main__:entry_point"
[project.urls]
Homepage = "https://github.com/projg2/pycargoebuild/"

[tool.flit.external-data]
directory = "data"

[tool.flit.sdist]
include = [
"COPYING",
Expand Down

0 comments on commit fd7c4dc

Please sign in to comment.