jw-pkg.py: Enable argcomplete

Register a bash-completion handler for jw-pkg.py, and mark it with
PYTHON_ARGCOMPLETE_OK.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-03-06 09:12:01 +01:00
commit e9cb539ecf
3 changed files with 10 additions and 0 deletions

View file

@ -0,0 +1,8 @@
TOPDIR = ../..
INSTALL_CFGDIR = $(ENV_PREFIX)/usr/share/bash-completion/completions
LOCAL_CFG = $(filter-out Makefile,$(wildcard *))
PACKAGE_INSTALL_DIR = false
include $(TOPDIR)/make/proj.mk
include $(JWBDIR)/make/conf.mk

View file

@ -0,0 +1 @@
eval "$(register-python-argcomplete /opt/jw-pkg/bin/jw-pkg.py jw-pkg.py)"

View file

@ -1,5 +1,6 @@
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# PYTHON_ARGCOMPLETE_OK
from jw.pkg.App import App