Projects
Mega:24.09
bash-completion
Sign Up
Log In
Username
Password
We truncated the diff of some files because they were too big. If you want to see the full diff for every file,
click here
.
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 2
View file
_service:tar_scm:bash-completion.spec
Changed
@@ -2,7 +2,7 @@ %define _python_bytecompile_errors_terminate_build 0 Name: bash-completion -Version: 2.12.0 +Version: 2.14.0 Release: 1 Epoch: 1 Summary: Completion for bash command @@ -10,7 +10,7 @@ URL: https://github.com/scop/bash-completion Source0: https://github.com/scop/%{name}/releases/download/%{version}/%{name}-%{version}.tar.xz -Patch0: bash-completion-2.12.0-remove-python2.patch +Patch0: bash-completion-2.14.0-remove-python2.patch BuildArch: noarch @@ -64,6 +64,9 @@ %doc CHANGELOG.md README.md doc/configuration.md CONTRIBUTING.md %changelog +* Mon Jul 01 2024 warlcok <hunan@kylinos.cn> - 1:2.14.0-1 +- update to 2.14.0 + * Mon Mar 04 2024 yueyuankun<yueyuankun@kylinos.cn> - 1:2.12.0-1 - Type:update - ID:NA
View file
_service:tar_scm:bash-completion-1.99-noblacklist.patch
Deleted
@@ -1,12 +0,0 @@ -diff -up bash-completion-1.99/bash_completion~ bash-completion-1.99/bash_completion ---- bash-completion-1.99/bash_completion~ 2012-01-08 01:03:46.000000000 +0200 -+++ bash-completion-1.99/bash_completion 2012-01-08 13:50:33.412012530 +0200 -@@ -45,7 +45,7 @@ readonly BASH_COMPLETION_COMPAT_DIR - - # Blacklisted completions, causing problems with our code. - # --_blacklist_glob='@(acroread.sh)' -+_blacklist_glob='@()' - - # Turn on extended globbing and programmable completion - shopt -s extglob progcomp
View file
_service:tar_scm:bash-completion-2.12.0-remove-python2.patch -> _service:tar_scm:bash-completion-2.14.0-remove-python2.patch
Changed
@@ -1,7 +1,7 @@ From 4add64d07eb56f42ce9c9c6255bcbc64dafa9b1c Mon Sep 17 00:00:00 2001 From: yueyuankun <yueyuankun@kylinos.cn> Date: Mon, 4 Mar 2024 11:14:11 +0800 -Subject: PATCH bash-completion-2.12.0 remove python2 +Subject: PATCH bash-completion-2.14.0 remove python2 --- completions/Makefile.am | 11 +++--------
View file
_service:tar_scm:bash-completion-remove-python2.patch
Deleted
@@ -1,70 +0,0 @@ -From f13d6bc1c1675eddf148db3d0b942872aef398ec Mon Sep 17 00:00:00 2001 -From: renhongxun <renhongxun@h-partners.com> -Date: Mon, 20 Jun 2022 10:54:26 +0800 -Subject: PATCH bash-completion remove python2 - ---- - completions/Makefile.am | 4 +--- - completions/Makefile.in | 4 +--- - completions/python | 2 +- - 3 files changed, 3 insertions(+), 7 deletions(-) - -diff --git a/completions/Makefile.am b/completions/Makefile.am -index 723b42f..2d0c0f2 100644 ---- a/completions/Makefile.am -+++ b/completions/Makefile.am -@@ -666,8 +666,6 @@ CLEANFILES = \ - pypy3 \ - pytest-2 \ - pytest-3 \ -- python2 \ -- python2.7 \ - python3 \ - python3.3 \ - python3.4 \ -@@ -890,7 +888,7 @@ symlinks: $(DATA) - $(ss) pylint \ - pylint-2 pylint-3 - $(ss) python \ -- micropython pypy pypy3 python2 python2.7 python3 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 -+ micropython pypy pypy3 python3 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 - $(ss) pyvenv \ - pyvenv-3.4 pyvenv-3.5 pyvenv-3.6 pyvenv-3.7 pyvenv-3.8 - $(ss) qdbus \ -diff --git a/completions/Makefile.in b/completions/Makefile.in -index b8a439f..fe2ad1c 100644 ---- a/completions/Makefile.in -+++ b/completions/Makefile.in -@@ -890,8 +890,6 @@ CLEANFILES = \ - pypy3 \ - pytest-2 \ - pytest-3 \ -- python2 \ -- python2.7 \ - python3 \ - python3.3 \ - python3.4 \ -@@ -1332,7 +1330,7 @@ symlinks: $(DATA) - $(ss) pylint \ - pylint-2 pylint-3 - $(ss) python \ -- micropython pypy pypy3 python2 python2.7 python3 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 -+ micropython pypy pypy3 python3 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 - $(ss) pyvenv \ - pyvenv-3.4 pyvenv-3.5 pyvenv-3.6 pyvenv-3.7 pyvenv-3.8 - $(ss) qdbus \ -diff --git a/completions/python b/completions/python -index d50c18f..a8c17db 100644 ---- a/completions/python -+++ b/completions/python -@@ -62,6 +62,6 @@ _python() - COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur")) - fi - } && -- complete -F _python python python2 python2.7 python3 python3.{3..8} pypy pypy3 micropython -+ complete -F _python python python3 python3.{3..8} pypy pypy3 micropython - - # ex: filetype=sh --- -1.8.3.1 -
View file
_service:tar_scm:bash-completion-remove-redundant-python2-links.patch
Deleted
@@ -1,79 +0,0 @@ -From e67d1ffcb510e314f3bd37446ab8e79078ea9a0b Mon Sep 17 00:00:00 2001 -From: liyuan <liyuanyuan@xfusion.com> -Date: Tue, 2 Aug 2022 15:15:09 +0800 -Subject: PATCH bash completion remove redundant python2 links - ---- - completions/Makefile.am | 7 ++----- - completions/Makefile.in | 7 ++----- - 2 files changed, 4 insertions(+), 10 deletions(-) - -diff --git a/completions/Makefile.am b/completions/Makefile.am -index 2d0c0f2..91a6a90 100644 ---- a/completions/Makefile.am -+++ b/completions/Makefile.am -@@ -657,14 +657,11 @@ CLEANFILES = \ - pvscan \ - pxz \ - py.test \ -- py.test-2 \ - py.test-3 \ - pydoc3 \ -- pylint-2 \ - pylint-3 \ - pypy \ - pypy3 \ -- pytest-2 \ - pytest-3 \ - python3 \ - python3.3 \ -@@ -882,11 +879,11 @@ symlinks: $(DATA) - filebucket puppetca puppetd puppetdoc puppetmasterd puppetqd \ - puppetrun ralsh - $(ss) pytest \ -- py.test py.test-2 py.test-3 pytest-2 pytest-3 -+ py.test py.test-3 pytest-3 - $(ss) pydoc \ - pydoc3 - $(ss) pylint \ -- pylint-2 pylint-3 -+ pylint-3 - $(ss) python \ - micropython pypy pypy3 python3 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 - $(ss) pyvenv \ -diff --git a/completions/Makefile.in b/completions/Makefile.in -index fe2ad1c..897faba 100644 ---- a/completions/Makefile.in -+++ b/completions/Makefile.in -@@ -881,14 +881,11 @@ CLEANFILES = \ - pvscan \ - pxz \ - py.test \ -- py.test-2 \ - py.test-3 \ - pydoc3 \ -- pylint-2 \ - pylint-3 \ - pypy \ - pypy3 \ -- pytest-2 \ - pytest-3 \ - python3 \ - python3.3 \ -@@ -1324,11 +1321,11 @@ symlinks: $(DATA) - filebucket puppetca puppetd puppetdoc puppetmasterd puppetqd \ - puppetrun ralsh - $(ss) pytest \ -- py.test py.test-2 py.test-3 pytest-2 pytest-3 -+ py.test py.test-3 pytest-3 - $(ss) pydoc \ - pydoc3 - $(ss) pylint \ -- pylint-2 pylint-3 -+ pylint-3 - $(ss) python \ - micropython pypy pypy3 python3 python3.3 python3.4 python3.5 python3.6 python3.7 python3.8 - $(ss) pyvenv \ --- -2.33.0 -
View file
_service
Changed
@@ -2,7 +2,7 @@ <service name="tar_scm"> <param name="scm">git</param> <param name="url">git@gitee.com:src-openeuler/bash-completion.git</param> - <param name="revision">master</param> + <param name="revision">openEuler-24.09</param> <param name="exclude">*</param> <param name="extract">*</param> </service>
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/fixtures/_comp_load/bin
Deleted
-(directory)
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/.shellcheckrc -> _service:tar_scm:bash-completion-2.14.0.tar.xz/.shellcheckrc
Changed
@@ -4,9 +4,7 @@ disable=SC1090 # not really fixable usually (ever?) disable=SC2034 # for localizing variables set in called functions disable=SC2128 # intentional style choice -disable=SC2206 # suggested alternatives fail in posix mode or use temp files disable=SC2209 # interferes with our `set` (literal) vs empty booleans -disable=SC2207 # suggested alternatives fail in posix mode or use temp files # These disables are to be investigated and decided
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/CHANGELOG.md -> _service:tar_scm:bash-completion-2.14.0.tar.xz/CHANGELOG.md
Changed
@@ -1,3 +1,305 @@ +## 2.14.0(https://github.com/scop/bash-completion/compare/2.13.0...2.14.0) (2024-05-09) + + +### Features + +* **bao:** add 3rd party fallback completion loader (af7fbb9(https://github.com/scop/bash-completion/commit/af7fbb97b470abce4025144fe4676c38cf4514d4)) +* **cryptsetup:** complete --header with filenames (4c9fc87(https://github.com/scop/bash-completion/commit/4c9fc87975bd2dc04a6851017d9a71116ec1e44f)) +* **dlv:** add 3rd party fallback completion loader (eefe71d(https://github.com/scop/bash-completion/commit/eefe71d8681d0735abc541cd0b7d2c7f9c535212)) +* **env:** complete commands and variable assignments (5c75fa3(https://github.com/scop/bash-completion/commit/5c75fa332b5f86863f14c2ef45cdc8732c9a2c35)) +* **env:** treat `-*` as the command name after `-` and `--` (0cd2883(https://github.com/scop/bash-completion/commit/0cd2883ca17e65a86fe81c650cea869f9fc70839)) +* **env:** treat `-*` as the command name after assignments (71b7fb2(https://github.com/scop/bash-completion/commit/71b7fb2bc6fd9eef901e959aaf089419cc6f74a4)) +* **gup:** add 3rd party fallback completion loader (>= 0.25.0) (1641f1a(https://github.com/scop/bash-completion/commit/1641f1a3043e3a378b4dd08a0f07240dd1d56548)) +* **incus:** add 3rd party fallback completion loader (7108d9c(https://github.com/scop/bash-completion/commit/7108d9ca84a2617ae36e88181d39aeeabe3225dd)) +* **ip:** Complete 'route get' options (12fbdb1(https://github.com/scop/bash-completion/commit/12fbdb163b9ffabb5f673c910a98edc8eaa6ac65)) +* **ip:** Complete addr add/change/replace options (8262664(https://github.com/scop/bash-completion/commit/82626648c75406509187d3775b25430da6347fea)) +* **ip:** Complete ip route list options (43beafc(https://github.com/scop/bash-completion/commit/43beafcfde8f6c8630ad9197ffbae76bfae010a5)) +* **ip:** Complete link afstats command (6721346(https://github.com/scop/bash-completion/commit/672134688efceb71dc58c1c00463f8c38a4b0477)) +* **ip:** Complete neigh add, del, change, replace (ba80203(https://github.com/scop/bash-completion/commit/ba8020349c965e92e25ae66fc1f8eceda50bc450)) +* **ip:** Complete route save/showdump (606f650(https://github.com/scop/bash-completion/commit/606f6509ddff9c30bb8b4971fb16a90fa39e4dfe)) +* **iperf:** --tos/-S argument completion (d2f59bb(https://github.com/scop/bash-completion/commit/d2f59bb6fa55e2f4becd21bdd21ff75fe627ad38)) +* **ssh-copy-id:** (non-)complete args to `-t` and `-F` (53fdce4(https://github.com/scop/bash-completion/commit/53fdce4bd972a71dba3e8e5be05eadb443ec93f3)) +* **ssh-keygen:** complete -r/-Y specific -O args (d6977fc(https://github.com/scop/bash-completion/commit/d6977fcd43302c8b3820fe5f90ce56c31db6e5ad)) +* **ssh-keyscan:** complete -O argument (39ea543(https://github.com/scop/bash-completion/commit/39ea5435abfc4b13445bb0eec086e246e3cadb38)) +* **tofu:** add 3rd party fallback completion loader (4edd9a2(https://github.com/scop/bash-completion/commit/4edd9a2bde503d3897eb1906275d6509a3fafc97)) +* **zarf:** add 3rd party fallback completion loader (032f0f0(https://github.com/scop/bash-completion/commit/032f0f0f35b53856c3be642bb3101a4d01c81aee)) + + +### Bug Fixes + +* **_comp_{compgen,xfunc}:** use `declare -F --` for arbitrary funcs (8998491(https://github.com/scop/bash-completion/commit/899849127707f6d616d5312c0efab0092b8caea8)) +* **_comp_{load,realcommand}:** handle option-like command name (883946d(https://github.com/scop/bash-completion/commit/883946d84d13d7947eb0c21a536bd947b3dbc31a)) +* **available_interfaces:** strip only trailing colon from entries (a452aee(https://github.com/scop/bash-completion/commit/a452aee8fb58720ecfadbdaad95277ac9d9072ac)) +* **bash_completion,conftest:** use `complete -p --` for arbitrary cmds (dafd338(https://github.com/scop/bash-completion/commit/dafd3382e019cf90156cc6abc4266a82ab4ebe5f)) +* **fio:** engines completion (27a0ef8(https://github.com/scop/bash-completion/commit/27a0ef80a2dbd84d8a0d2f90945cc66577149726)) +* **ip:** Complete link change as well as set (956bd5d(https://github.com/scop/bash-completion/commit/956bd5dfd26f40ba23d1708bb15174d18b142087)) +* **ip:** Don't stop at proxy and nomaster in neigh (d58ea76(https://github.com/scop/bash-completion/commit/d58ea763364f234ed90e8152f36b99f02e82ec84)) +* **scp remote_files:** do not filter generated paths with "$cur" (bc812df(https://github.com/scop/bash-completion/commit/bc812dff7246e5186c7ae752081605787942f8f9)) +* **scp remote_files:** localize variable `cur` (34f7d0c(https://github.com/scop/bash-completion/commit/34f7d0c321977016e3191cb7e9ab7ebd1a4083a0)) +* **ssh-keygen:** handling of bundled short options (18e436d(https://github.com/scop/bash-completion/commit/18e436d0a0a25809bc1c8e6457aaa78a1667fa51)) +* **ssh-keygen:** make work with custom IFS (b71340b(https://github.com/scop/bash-completion/commit/b71340bb411fb5d8ddb0c96836e484ace7eeb8f3)) +* **ssh-keygen:** suggest -O arg completions depending on mode (b49ab1d(https://github.com/scop/bash-completion/commit/b49ab1d9f5515d12920ddb1548790fa0bf78d0b1)) +* use -- to pass arbitrary cmdnames to `_comp_load` (3c1d9bc(https://github.com/scop/bash-completion/commit/3c1d9bc3f5432dee7de0935e8a4b6bf66c2fad77)) +* use `pathcmd=$(type -P -- "$1")` for arbitrary cmds (8795ca9(https://github.com/scop/bash-completion/commit/8795ca99f3eb147e26d49f06e535f0ce64b4d162)) + +## 2.13.0(https://github.com/scop/bash-completion/compare/2.12.0...2.13.0) (2024-04-03) + + +### Features + +* **curl:** Complete protocols for --proto-default (7051379(https://github.com/scop/bash-completion/commit/7051379e448147407c3fe43c89872dafb76ebb27)) +* **ip:** Add completion for netconf subcommand (03a10ff(https://github.com/scop/bash-completion/commit/03a10ff63226782e61dae4407138c3240ff0c7c2)) +* **ip:** Complete commands for netns exec (1f03796(https://github.com/scop/bash-completion/commit/1f03796cd930ddad6207d46814da820674f16edc)) +* **ip:** Complete help for unknown subcommands (21f7e32(https://github.com/scop/bash-completion/commit/21f7e32f9009c2064d1659668425b6b6ccb537bd)) +* **ip:** Complete ip link property (efa663c(https://github.com/scop/bash-completion/commit/efa663cd0dd63d54fd2d2987ee66fb954ccf4a86)) +* **ip:** Complete link types for address show (ca5ea03(https://github.com/scop/bash-completion/commit/ca5ea037e2ec1b0b5ec4d31295df88125d51b43e)) +* **ip:** Complete neigh show and flush (c7c3c03(https://github.com/scop/bash-completion/commit/c7c3c039bf5a462ea577e8fcc92ebd94d6afad49)) +* **ip:** Complete stats subcommand (cd73e8c(https://github.com/scop/bash-completion/commit/cd73e8c1689e3e014c4a75d5101ee3d932013120)) +* **ip:** Create function to get link types (8e60245(https://github.com/scop/bash-completion/commit/8e60245c7531e1615dc96b032035bb4f59972f4a)) +* **rg:** add fallback 3rd party completion loader (7e4cc2f(https://github.com/scop/bash-completion/commit/7e4cc2fb199f1c88bd9a358a157fe06327fc2b28)) +* **xmllint,xmlwf:** also suggest *.rss files (a89cde2(https://github.com/scop/bash-completion/commit/a89cde2216b1634521b4a264b2dbc5cda7522061)) + + +### Bug Fixes + +* **available_interfaces:** fix regression of unwanted trailing colons (c2f83e0(https://github.com/scop/bash-completion/commit/c2f83e0436208ef2bfa9c762bc28ff6374ba0c73)) +* **ip:** Complete addrlabel add/del properties (ea07616(https://github.com/scop/bash-completion/commit/ea076166e9a5cce9d22a27e63f95bbf00be9b894)) +* **ip:** Complete ip delete with type correctly (f3a9be3(https://github.com/scop/bash-completion/commit/f3a9be3e2f6eaf0d94bb66220fd02cf0e3c76481)) +* **ip:** Complete more variations of subcommands (c8920c5(https://github.com/scop/bash-completion/commit/c8920c57f83199a14230485cc44b426f028acafb)) +* **ip:** Complete netns attach subcommand (bfb1de6(https://github.com/scop/bash-completion/commit/bfb1de64a53d1eba749c9921cea3809460cd2319)) +* **ip:** Complete only relevant addrlabel subcmds (05147f1(https://github.com/scop/bash-completion/commit/05147f19d3d04040fa8dacbd9e1705bfc1432073)) +* **ip:** Keep completing after -netns name (1a5df4f(https://github.com/scop/bash-completion/commit/1a5df4fe22eb374424b18e7db27b8446e919f4b2)) +* **ip:** Quote all instantiation of ip as "$1" (ef25163(https://github.com/scop/bash-completion/commit/ef25163e6bd9095e528b57d44cb31d32f0321bb9)) +* **ip:** Quote network namespace names (216734b(https://github.com/scop/bash-completion/commit/216734bed7ba02655128bf1dbc2f184420ad69ef)) +* **Makefile:** include api-and-naming.md in dist (fdd8048(https://github.com/scop/bash-completion/commit/fdd80487ba6944e639baf32ba991f8665840728d)) + +## 2.12.0(https://github.com/scop/bash-completion/compare/v2.11.0...2.12.0) (2024-02-21) + + +### Features + +* **_comp_backup_glob:** add `ucf` generated backup files (351be1c(https://github.com/scop/bash-completion/commit/351be1c81ecd97135d3df64475a93d57526d5630)) +* **_comp_backup_glob:** require dash in dpkg backup files (59a57f9(https://github.com/scop/bash-completion/commit/59a57f9f8c6a47dc9d21c61d13ffb90a5f3b82f0)) +* **_comp_compgen_{filedir,set}:** define exit status (7920c9d(https://github.com/scop/bash-completion/commit/7920c9dbe46bd5ad0a92e78b744f00ffe8b14e76)) +* **_comp_compgen_commands:** align return value with other compgens (9d3362e(https://github.com/scop/bash-completion/commit/9d3362e4a092efaecda2fa2a5f01feca75e7b24e)) +* **_comp_compgen_commands:** auto set `-o filenames` when appropriate (4d4839e(https://github.com/scop/bash-completion/commit/4d4839e50210de4d3a8780caa4b9d8ab44b8f86d)) +* **_comp_compgen_commands:** include dirs (b9c7b5d(https://github.com/scop/bash-completion/commit/b9c7b5dc414c09d27a6b157d37bede70e662b91c)) +* **_comp_compgen_known_hosts:** return 2 on usage error (43bb8f0(https://github.com/scop/bash-completion/commit/43bb8f03798811d95a3068a8a53d2eac9ad877b5)) +* **_comp_compgen:** support `-i cmd` and `-x cmd` (39cc200(https://github.com/scop/bash-completion/commit/39cc200f9e6d9b03d1e76a924371f85304e786d5)) +* **_comp_compgen:** support `-U var` to unlocal var (b603535(https://github.com/scop/bash-completion/commit/b60353508eb470515f1063a1e1a75bdf1fda730f)) +* **_comp_compgen:** support option -C (6b3dfa5(https://github.com/scop/bash-completion/commit/6b3dfa529950f3bc51b8ead9323a82f65c5cfeb9)) +* **_comp_expand_glob:** fail when no paths are generated (6b0a466(https://github.com/scop/bash-completion/commit/6b0a46644d587182c20f880755a821a7680753fe)) +* **_comp_get_fist_arg:** support "-o GLOB" to skip optargs (0f14cc0(https://github.com/scop/bash-completion/commit/0f14cc030ebdb54f3d120d8cadc08651dad00624)) +* **_ip_addresses:** auto ltrim colon completions when appropriate (ccdf953(https://github.com/scop/bash-completion/commit/ccdf953b7956d6fc65334e9049e157a3480a5cfa)) +* add _comp_compgen_split (542bf73(https://github.com/scop/bash-completion/commit/542bf73f571312659293dac664bf257ef66fbfef)) +* add `_comp_locate_first_arg` (0384bd5(https://github.com/scop/bash-completion/commit/0384bd51df3f68a3e065aeead4e921462fff6655)) +* **airflow:** add fallback 3rd party completion loader (bf5550b(https://github.com/scop/bash-completion/commit/bf5550b5fc304ed956b6061221f173516408d82d)) +* **ansible*:** add fallback 3rd party completion loader (5f8384e(https://github.com/scop/bash-completion/commit/5f8384ef71acd1dc6e214177e5bbe3b0b83ee976)) +* **apt-get:** prefer `apt-cache` in same dir as command (a731bfd(https://github.com/scop/bash-completion/commit/a731bfd0acf77c7e5ec52315e3b470cffa177b4a)) +* **b2sum:** new completion (cd985df(https://github.com/scop/bash-completion/commit/cd985df6d8e613fd5421066248db1c50dc1686bd)) +* **bash_completion:** add function _comp_compgen_ltrim_colon (ce5889b(https://github.com/scop/bash-completion/commit/ce5889ba3b1364d9afe7096c6fa14d7c65d08cc6)) +* **black,blackd:** add fallback 3rd party completion loader (47a1f05(https://github.com/scop/bash-completion/commit/47a1f05e75399d25dcf0281ae6f8ba363a82e6bc)) +* **carton:** support exec command completions (0eb3a21(https://github.com/scop/bash-completion/commit/0eb3a21afdcd4c52966e0894f43f501dc3b727e3)) +* **chezmoi:** add 3rd-party completion loader (cobra) (31baa69(https://github.com/scop/bash-completion/commit/31baa69954351a2d30047f707692d361646aea53)) +* **conda:** add 3rd-party completion loader (argcomplete) (c0f5ba2(https://github.com/scop/bash-completion/commit/c0f5ba2e19abea70dcde4bf0aafe36de801b28c0)) +* **crc:** add 3rd-party completion loader (cobra) (f10866e(https://github.com/scop/bash-completion/commit/f10866e1aaf810ae5cb29ccd5c1e8ac722d0f2ae)) +* **cz:** add fallback 3rd party completion loader (b7ba70e(https://github.com/scop/bash-completion/commit/b7ba70e52e1e0f287c29b5d7362439dccd132e8b)) +* **dot:** support filename extension .gv (be0010e(https://github.com/scop/bash-completion/commit/be0010e8517de89bf06bda02bdccacc51968136e)) +* **dprint:** add fallback 3rd party completion loader (e201e0e(https://github.com/scop/bash-completion/commit/e201e0ee336e79c26bce2afc3f2b4f98d4fea12d)) +* **eog:** add missing extension .heif (9e4a48f(https://github.com/scop/bash-completion/commit/9e4a48fdaa372a41e6ad5c7d021164394054aa97)) +* **eog:** associate with `*.avif` and `*.webp` (#1005(https://github.com/scop/bash-completion/issues/1005)) (f1c04b8(https://github.com/scop/bash-completion/commit/f1c04b816e1612acdac62605528d32b5d896916f)) +* **eog:** associate with `*.heic` and `*.jxl` (20c9cea(https://github.com/scop/bash-completion/commit/20c9cea129e1f1e92045098ce7555a3f2add30e8)) +* **eog:** associate with `*.pbm` (#1006(https://github.com/scop/bash-completion/issues/1006)) (5472cc1(https://github.com/scop/bash-completion/commit/5472cc1fef9c60abf240bd8f4acf38dbdaabf1a1)) +* **feh:** associate with y4m and heic/heif/avif (e252c73(https://github.com/scop/bash-completion/commit/e252c73ff2b92320dfabc9daf0d3f4ac15171e96)) +* **feh:** deassociate with avci/avcs (af46f34(https://github.com/scop/bash-completion/commit/af46f3411acfbd28624f57ff6a7511148d1857f9)) +* **flask:** add fallback 3rd party completion loader (3e0d00d(https://github.com/scop/bash-completion/commit/3e0d00d4ea55a200ea67196a6de841e8633fcad3)) +* **hash:** new completion (#1013(https://github.com/scop/bash-completion/issues/1013)) (4d0bffb(https://github.com/scop/bash-completion/commit/4d0bffb791c34c96114aeb2e4f6726b80aa8698e)) +* **httpx:** add fallback 3rd party completion loader (3f4861c(https://github.com/scop/bash-completion/commit/3f4861cc41ea05982b2c4a98cc1f56f21895419b)) +* **ip:** Add completion for monitor subcommand (fa696e6(https://github.com/scop/bash-completion/commit/fa696e60f3fe525a14bfbb409effb4e51b2e4450)) +* **jungle:** add fallback 3rd-party completion loader (c69845a(https://github.com/scop/bash-completion/commit/c69845abf7efe9c226cef46ebf8b9129058db43d)) +* **keyring:** add fallback 3rd party completion loader (8082602(https://github.com/scop/bash-completion/commit/80826028b7760409f20624a6fb4f4c5a4eaec8e3)) +* **kontena:** add fallback 3rd-party completion loader (5eef0ce(https://github.com/scop/bash-completion/commit/5eef0ce3e5bd29f32d5830abfaf60da1295c4562)) +* **lefthook:** add fallback 3rd party completion loader (dc9650e(https://github.com/scop/bash-completion/commit/dc9650e917d2018fa9eeb251e2c3db2b0f9d230a)) +* **mailman:** prefer `list_lists` in same dir as command (a46ccf1(https://github.com/scop/bash-completion/commit/a46ccf132d53f4f5adf5ad3b0e51ec1dde931298)) +* **mysql:** prefer `mysqlshow` from same dir (643886c(https://github.com/scop/bash-completion/commit/643886cf3c34eef47a86fbc6c2a64712c455dad3)) +* no empty command completion if `no_empty_cmd_completion` is on (faab292(https://github.com/scop/bash-completion/commit/faab29286074ec3c952dfe50f0cb22af65dadbeb)) +* **npm:** add fallback 3rd-party completion loader (f1c085c(https://github.com/scop/bash-completion/commit/f1c085cc56cf15d2bd0c97148535e36e81dfc5d4)) +* **nvm:** add fallback 3rd-party completion loader (dea7e1d(https://github.com/scop/bash-completion/commit/dea7e1d431f1700c2515ece47b07ba472e1f999c)) +* **oc:** add 3rd-party completion loader (cobra) (26b5f09(https://github.com/scop/bash-completion/commit/26b5f09490159fd8fc6b7c592cb70c40e8b214dc)) +* **pip{,3}:** add fallback 3rd-party completion loader (e3cbfba(https://github.com/scop/bash-completion/commit/e3cbfba64e6f52ee49c59052ef40eb4a11a48849)) +* **pipenv:** add fallback 3rd party completion loader (#1020(https://github.com/scop/bash-completion/issues/1020)) (6ecf5bd(https://github.com/scop/bash-completion/commit/6ecf5bdb3c534db894da60e336f58235547de80d)) +* **pytest:** complete new --import-mode value (#1021(https://github.com/scop/bash-completion/issues/1021)) (2d636a3(https://github.com/scop/bash-completion/commit/2d636a3cb4ee66b4bc3355fadff1a1e4246199d4)) +* **rtx:** add fallback 3rd party completion loader (0628e22(https://github.com/scop/bash-completion/commit/0628e223689b7bad0b9dc43e56d935a66b73b8a2)) +* **scp,sftp:** prefer `ssh` from same dir to resolve options etc (d55f5e6(https://github.com/scop/bash-completion/commit/d55f5e6a9e9fb53b02bb86a8fc6278e671099bb0)) +* **ssh-copy-id,ssh-keygen:** prefer `ssh` from same dir (5c1d270(https://github.com/scop/bash-completion/commit/5c1d2701456e14fbe946ef7ccfecc7e10829b806)) +* **ssh-inscribe:** add fallback 3rd party completion loader (7f2c197(https://github.com/scop/bash-completion/commit/7f2c197e4e59b313d0f47cde902f57145106660e)) +* **ssh:** complete RequiredRSASize (#1064(https://github.com/scop/bash-completion/issues/1064)) (de15205(https://github.com/scop/bash-completion/commit/de15205d6c7997e8596dce4f9d2a2bfc476be716)) +* **tkn-pac:** add 3rd-party completion loader (cobra) (d0f2604(https://github.com/scop/bash-completion/commit/d0f26045937276427ebb9844e84f40cff1b928f4)) +* **tkn:** add 3rd-party completion loader (cobra) (161fc5d(https://github.com/scop/bash-completion/commit/161fc5d42cd7dd814a9197f788045ca052062c22)) +* **xrandr:** comma separated `--setmonitor` third argument (8a76f3d(https://github.com/scop/bash-completion/commit/8a76f3d75db290302f94ea732e01a9afd25c2c24)) + + +### Bug Fixes + +* **__load_completion:** quoted compspec for variants (#1008(https://github.com/scop/bash-completion/issues/1008)) (0a2443e(https://github.com/scop/bash-completion/commit/0a2443e3eec8557273dd905df9a28dc177861023)) +* **_cd_devices:** `/dev/cdc-*` CDC device false positives (5250728(https://github.com/scop/bash-completion/commit/52507286a6ea8c576414d7cca0f6a2d30dd78c84)) +* **_comp__init_set_up_service_completions:** work around failglob (2529d40(https://github.com/scop/bash-completion/commit/2529d40f22039b344fd0bb5280a8469b8783f2a9)) +* **_comp_{first_arg,count_args}:** count - as argument (e23a79e(https://github.com/scop/bash-completion/commit/e23a79e0fd715b0ae564082d9f1e4e7a907a195d)) +* **_comp_{first_arg,count_args}:** count any arguments after -- (9bfd760(https://github.com/scop/bash-completion/commit/9bfd760c1192da7b3d0d8f0f9c8bea8ed16f4e47)) +* **_comp_command_offset:** Support complete -C (80450ca(https://github.com/scop/bash-completion/commit/80450ca06973535671dc76ffe5abd6e377418f76)) +* **_comp_compgen_fstypes:** avoid unexpected expansions (a856d81(https://github.com/scop/bash-completion/commit/a856d811b73500550d317eff5fec487e41581add)) +* **_comp_compgen_help:** allow dots to connect names in longopt (79dadfc(https://github.com/scop/bash-completion/commit/79dadfc7fa37be26c7b263b809687db0907ae71f)) +* **_comp_compgen_known_hosts:** work around bash-4.2 nounset (d2860cb(https://github.com/scop/bash-completion/commit/d2860cb481be8f3cf97172cb1bf063da8f238e53)) +* **_comp_compgen_split:** work around nounset (f488f96(https://github.com/scop/bash-completion/commit/f488f9615a58140dc610bf2d406f3fcf6b8d82da)) +* **_comp_compgen_term:** replace completions by default (d3696a3(https://github.com/scop/bash-completion/commit/d3696a3f793b2e0b9a0940287b3ab3dd23ef247d)) +* **_comp_compgen_usergroup:** avoid directly overwriting COMPREPLY (d380498(https://github.com/scop/bash-completion/commit/d3804982650ec4fc7fbb7f7cab5522709b43f52d)) +* **_comp_compgen:** do not inherit -a for explicitly specified var (3c20766(https://github.com/scop/bash-completion/commit/3c20766a6248aec000eb55731dd6b159ecf45dc2)) +* **_comp_compgen:** explicitly exclude `cur` from the target variable (5fe98f3(https://github.com/scop/bash-completion/commit/5fe98f3c30fa69d0921703c7c90522a28bb00737)) +* **_comp_count_args:** check optarg correctly (874c503(https://github.com/scop/bash-completion/commit/874c5031986e23a3ca7843d216d7dde94b0f1d4b)) +* **_comp_count_args:** exclude <>& from wordbreaks as _comp_initialize (521d2bb(https://github.com/scop/bash-completion/commit/521d2bb5330de4a721ae20d37d330190aa4beef0)) +* **_comp_count_args:** ignore empty $3 (76eea74(https://github.com/scop/bash-completion/commit/76eea74581d4f404e817f686ea86236c8c75a9fc)) +* **_comp_count_args:** perform optarg check also on $3 (21d3122(https://github.com/scop/bash-completion/commit/21d3122fa933169849e9743212248c80b7843abb)) +* **_comp_count_args:** skip reassembling cword and words (3127703(https://github.com/scop/bash-completion/commit/3127703f12f3e82ddf3f950a801ab430024aca22)) +* **_comp_delimited:** treat delimiter as a fixed string (571a0f7(https://github.com/scop/bash-completion/commit/571a0f70f39fed70b2db51e1624b2a0ee29f00c4)) +* **_comp_deprecate_func:** argument order in usage error message (597f62f(https://github.com/scop/bash-completion/commit/597f62fe38627452f5330d40bc9004f2b3d4dda5)) +* **_comp_get_words:** empty prev if unavailable (localvar_inherit) (d8b8eef(https://github.com/scop/bash-completion/commit/d8b8eef63602cb0e34837320938b0819363d7d87)) +* **_comp_initialize:** fix completions of redirections without space (da16bf6(https://github.com/scop/bash-completion/commit/da16bf61c2604ea4efa9b2d125aedd2dd4acd4e5)) +* **_comp_initialize:** protect against "localvar_inherit" (0cc8d83(https://github.com/scop/bash-completion/commit/0cc8d833011c0763eb00939ad9a94d525d87bcea)) +* **_comp_split,_comp_compgen:** strip periods from error message (b3b6a7c(https://github.com/scop/bash-completion/commit/b3b6a7cf2865b3591ab571dc2563d1980a822ac5)) +* **_comp_split:** update error message for the correct options (3c4a89c(https://github.com/scop/bash-completion/commit/3c4a89ce48ca29c0c6461d12519bbf78bcc1ca02)) +* **_comp_sysvdirs:** work around nounset (da26178(https://github.com/scop/bash-completion/commit/da26178b9c7eaf11711b451ae292a01bd423a80c)) +* **_filedir_xspec:** clean up unused variable `tmp` (67f1189(https://github.com/scop/bash-completion/commit/67f11892351b710b9b3609e138a0a2c9248c4422)) +* **_get_cword_at_cursor,cvs:** quote array length (201239c(https://github.com/scop/bash-completion/commit/201239cb597a3d7d0165a5e37a093f063fe700d1)) +* **_get_first_arg:** remove invalid doccomment (eb40f56(https://github.com/scop/bash-completion/commit/eb40f566cc9e3c5a845a12caf0f4344dab2a0b2c)) +* **_known_hosts:** use array for `options` (work around SC2178,SC2179) (743d0a9(https://github.com/scop/bash-completion/commit/743d0a9be714c516dce23415e3a5c5f81d5d7bea)) +* **_mock,rpm:** avoid icase flag `s/reg/rep/i` of GNU sed (33c18ce(https://github.com/scop/bash-completion/commit/33c18ce90df153dabb89813d472dacf5a6259b92)) +* **_service:** quote word (c2d7fb7(https://github.com/scop/bash-completion/commit/c2d7fb73844531ccb10576ddd905fb058e00c88e)) +* **_slackpkg:** do not scan after cword (ecd1384(https://github.com/scop/bash-completion/commit/ecd13849f76966d9e15607bdd604972279bb9cd8)) +* **7z:** remove redundant `printf '%s\n' "..."` (20c2e32(https://github.com/scop/bash-completion/commit/20c2e322f8eb93240de73b62647e7ca2f7b8fa4f)) +* **ant:** work around custom IFS (584e567(https://github.com/scop/bash-completion/commit/584e56748da32e8f17a713b14c23ea2b7c92a4dc)) +* **apt-cache:** check all the words (84cfeda(https://github.com/scop/bash-completion/commit/84cfedabe958ad6f7cfc52525d79e9b801de4233)) +* **aptitude:** do not use non-POSIX BRE \w (cd8c870(https://github.com/scop/bash-completion/commit/cd8c8701b60f17f9aecc27482f64f121821085ee)) +* **aspell:** use `_comp_expand_glob` against unexpected splitting (58d5176(https://github.com/scop/bash-completion/commit/58d5176cba8bb25fe5348aadef100c083afa992f)) +* **bash_completion:** remove some unnecessary `-a` to `_comp_compgen` (636bb7c(https://github.com/scop/bash-completion/commit/636bb7c4062c3e410904769f1fde4f5b14a12afc)) +* **bts:** update functions to generators and fix variable conflicts (7d2867c(https://github.com/scop/bash-completion/commit/7d2867c01527c3037579fe24da62cccfdfd1883e)) +* **carton:** remove a branch never happening (cd063f9(https://github.com/scop/bash-completion/commit/cd063f9a40e4dc85e0a9de7ceeac019cdac57449)) +* **chgrp:** fix typo `_comp_compgen{d => _}filedir` (#1063(https://github.com/scop/bash-completion/issues/1063)) (4c98ce5(https://github.com/scop/bash-completion/commit/4c98ce58b7686b9f23f14bf05e809d9cd1a5669c)) +* **compat:** find compat dir for prefix-install (b6d06bc(https://github.com/scop/bash-completion/commit/b6d06bc47119fcfc47f10eed328ff54e95ddc14d)) +* **completions/*:** quote array assignments properly (848aa41(https://github.com/scop/bash-completion/commit/848aa413273516529ccc163966f138ad3a6c53a0)) +* **completions/*:** scan until cword instead of ${#words@}-1 (17e0cc3(https://github.com/scop/bash-completion/commit/17e0cc36fdb4c6543c7729419d6f736ee779db1f)) +* **completions/*:** work around localvar_inherit (e3a871d(https://github.com/scop/bash-completion/commit/e3a871d2517f688d7fe7132f33e96669a71b6aa1)) +* **curl,koji:** use _comp_compgen_help (f37f221(https://github.com/scop/bash-completion/commit/f37f221f3f191fec0d301815d276d830f6119186)) +* **curl,qemu:** avoid using POSIX character classes for mawk (d60c530(https://github.com/scop/bash-completion/commit/d60c5306f918b370c74f5ba6d3100720be139ad6)) +* **curl:** colon handling for IPv6 address completions (8508d1d(https://github.com/scop/bash-completion/commit/8508d1d8f6f3d50ac6fb45ec2eb0f05dcef8d817)) +* **cvs,mutt,pkg_delete:** quote prefix to remove for literal matching (533903e(https://github.com/scop/bash-completion/commit/533903edd5d0752cb4b910c3bcc6d86a0e55d779)) +* **cvs:** avoid variable conflicts (0d145c9(https://github.com/scop/bash-completion/commit/0d145c9f2852955848ca1855d9fae216ebbd78c3)) +* **dict:** nounset error when host/port not set (57191e2(https://github.com/scop/bash-completion/commit/57191e2731eb307434c2f11813d7dea303458dce)) +* **dict:** protect splitting from custom IFS (b31fe1e(https://github.com/scop/bash-completion/commit/b31fe1e3e1b3480d9dc6a469cae4e83ed204b382)) +* **dict:** work around bash-4.2 array nounset (d76dd9e(https://github.com/scop/bash-completion/commit/d76dd9ea448b71e111763e8048df49dde797d85e)) +* **dict:** work around bash-4.3 ${v+"$@"} with custom IFS (cc21298(https://github.com/scop/bash-completion/commit/cc212983a2b2523e5b62e9735c6dff5f011bb80a))
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/bash_completion -> _service:tar_scm:bash-completion-2.14.0.tar.xz/bash_completion
Changed
@@ -25,7 +25,7 @@ BASH_COMPLETION_VERSINFO=( 2 # x-release-please-major - 12 # x-release-please-minor + 14 # x-release-please-minor 0 # x-release-please-patch ) @@ -649,7 +649,7 @@ else _generator=("_comp_compgen_$1") fi - if ! declare -F "${_generator0}" &>/dev/null; then + if ! declare -F -- "${_generator0}" &>/dev/null; then printf 'bash_completion: %s: unrecognized generator `%s'\'' (function %s not found)\n' "$FUNCNAME" "$1" "${_generator0}" >&2 return 2 fi @@ -1737,7 +1737,7 @@ fi } 2>/dev/null | _comp_awk \ '/^^ \t/ { if ($1 ~ /^0-9+:/) { print $2 } else { print $1 } }')" && - _comp_compgen -U generated set "${generated@}" + _comp_compgen -U generated set "${generated@%:}" } # Echo number of CPUs, falling back to 1 on failure. @@ -2201,7 +2201,7 @@ { REPLY="" local file - file=$(type -P "$1") || return $? + file=$(type -P -- "$1") || return $? if type -p realpath >/dev/null; then REPLY=$(realpath "$file") elif type -p greadlink >/dev/null; then @@ -2765,18 +2765,18 @@ else _comp_dequote "${COMP_WORDS0}" || REPLY=${COMP_WORDS0} local cmd=$REPLY compcmd=$REPLY - local cspec=$(complete -p "$cmd" 2>/dev/null) + local cspec=$(complete -p -- "$cmd" 2>/dev/null) # If we have no completion for $cmd yet, see if we have for basename if ! $cspec && $cmd == */* ; then - cspec=$(complete -p "${cmd##*/}" 2>/dev/null) + cspec=$(complete -p -- "${cmd##*/}" 2>/dev/null) $cspec && compcmd=${cmd##*/} fi # If still nothing, just load it for the basename if ! $cspec ; then compcmd=${cmd##*/} _comp_load -D -- "$compcmd" - cspec=$(complete -p "$compcmd" 2>/dev/null) + cspec=$(complete -p -- "$compcmd" 2>/dev/null) fi local retry_count=0 @@ -2809,7 +2809,7 @@ # state of COMPREPLY is discarded. COMPREPLY=() - cspec=$(complete -p "$compcmd" 2>/dev/null) + cspec=$(complete -p -- "$compcmd" 2>/dev/null) # Note: When completion spec is removed after 124, we # do not generate any completions including the default @@ -2991,7 +2991,7 @@ # makeinfo and texi2dvi are defined elsewhere. complete -F _comp_complete_longopt \ a2ps awk base64 bash bc bison cat chroot colordiff cp \ - csplit cut date df diff dir du enscript env expand fmt fold gperf \ + csplit cut date df diff dir du enscript expand fmt fold gperf \ grep grub head irb ld ldd less ln ls m4 mkdir mkfifo mknod \ mv netstat nl nm objcopy objdump od paste pr ptx readelf rm rmdir \ sed seq shar sort split strip sum tac tail tee \ @@ -3147,13 +3147,13 @@ if $cmd == \\* ; then cmd=${cmd:1} # If we already have a completion for the "real" command, use it - $(complete -p "$cmd" 2>/dev/null || echo false) "\\$cmd" && return 0 + $(complete -p -- "$cmd" 2>/dev/null || echo false) "\\$cmd" && return 0 backslash=\\ fi # Resolve absolute path to $cmd local REPLY pathcmd origcmd=$cmd - if pathcmd=$(type -P "$cmd"); then + if pathcmd=$(type -P -- "$cmd"); then _comp_abspath "$pathcmd" cmd=$REPLY fi @@ -3222,18 +3222,18 @@ elif -e $compfile && . "$compfile" "$cmd" "$@"; then # At least $cmd is expected to have a completion set when # we return successfully; see if it already does - if compspec=$(complete -p "$cmd" 2>/dev/null); then + if compspec=$(complete -p -- "$cmd" 2>/dev/null); then # $cmd is the case in which we do backslash processing $backslash && eval "$compspec \"\$backslash\$cmd\"" # If invoked without path, that one should be set, too # ...but let's not overwrite an existing one, if any $origcmd != */* && - ! complete -p "$origcmd" &>/dev/null && + ! complete -p -- "$origcmd" &>/dev/null && eval "$compspec \"\$origcmd\"" return 0 fi # If not, see if we got one for $cmdname - if $cmdname != "$cmd" && compspec=$(complete -p "$cmdname" 2>/dev/null); then + if $cmdname != "$cmd" && compspec=$(complete -p -- "$cmdname" 2>/dev/null); then # Use that for $cmd too, if we have a full path to it $cmd == /* && eval "$compspec \"\$cmd\"" return 0 @@ -3281,7 +3281,7 @@ local xfunc_name=$2 $xfunc_name == _* || xfunc_name=_comp_xfunc_${1//^a-zA-Z0-9_/_}_$xfunc_name - declare -F "$xfunc_name" &>/dev/null || _comp_load "$1" + declare -F -- "$xfunc_name" &>/dev/null || _comp_load -- "$1" "$xfunc_name" "${@:3}" }
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/Makefile.am -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/Makefile.am
Changed
@@ -100,6 +100,7 @@ ebtables \ ecryptfs-migrate-home \ _eject \ + env \ eog \ ether-wake \ evince \ @@ -377,6 +378,7 @@ _reptyr \ resolvconf \ _rfkill \ + _rg \ ri \ rmlist \ rmmod \ @@ -544,6 +546,7 @@ autossh \ autoupdate \ avahi-browse-domains \ + _bao \ _black \ _blackd \ bmake \ @@ -584,6 +587,7 @@ dfutool \ _diesel \ display \ + _dlv \ _docker \ dpkg-deb \ dpkg-query \ @@ -643,6 +647,7 @@ gpgv2 \ gssdp-device-sniffer \ gtar \ + _gup \ hciattach \ hciconfig \ hd \ @@ -659,6 +664,7 @@ ifstatus \ _ignite \ import \ + _incus \ _infracost \ inotifywatch \ insmod.static \ @@ -875,6 +881,7 @@ _tkn \ _tkn-pac \ tightvncviewer \ + _tofu \ tracepath6 \ _trivy \ typeset \ @@ -910,6 +917,7 @@ xpovray \ xvnc4viewer \ ypcat \ + _zarf \ _zitadel symlinks: $(DATA) @@ -997,6 +1005,7 @@ _constellation \ _crc \ _datree \ + _dlv \ _docker \ _gardenctl \ _gh-label \ @@ -1004,8 +1013,10 @@ _go-licenses \ _gopherjs \ _goreleaser \ + _gup \ _helm \ _hugo \ + _incus \ _ignite \ _istioctl \ _k3s \ @@ -1046,6 +1057,7 @@ _upctl \ _vacuum \ _virtctl \ + _zarf \ _zitadel $(ss) gpgv \ gpgv2 @@ -1197,7 +1209,7 @@ $(ss) update-alternatives \ alternatives $(ss) _vault \ - _consul _nomad _packer _terraform + _bao _consul _nomad _packer _terraform _tofu $(ss) vipw \ vigr $(ss) vncviewer \
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/Makefile.in -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/Makefile.in
Changed
@@ -328,6 +328,7 @@ ebtables \ ecryptfs-migrate-home \ _eject \ + env \ eog \ ether-wake \ evince \ @@ -605,6 +606,7 @@ _reptyr \ resolvconf \ _rfkill \ + _rg \ ri \ rmlist \ rmmod \ @@ -771,6 +773,7 @@ autossh \ autoupdate \ avahi-browse-domains \ + _bao \ _black \ _blackd \ bmake \ @@ -811,6 +814,7 @@ dfutool \ _diesel \ display \ + _dlv \ _docker \ dpkg-deb \ dpkg-query \ @@ -870,6 +874,7 @@ gpgv2 \ gssdp-device-sniffer \ gtar \ + _gup \ hciattach \ hciconfig \ hd \ @@ -886,6 +891,7 @@ ifstatus \ _ignite \ import \ + _incus \ _infracost \ inotifywatch \ insmod.static \ @@ -1102,6 +1108,7 @@ _tkn \ _tkn-pac \ tightvncviewer \ + _tofu \ tracepath6 \ _trivy \ typeset \ @@ -1137,6 +1144,7 @@ xpovray \ xvnc4viewer \ ypcat \ + _zarf \ _zitadel SETUP_SYMLINKS = $(srcdir)/../setup-symlinks.sh @@ -1441,6 +1449,7 @@ _constellation \ _crc \ _datree \ + _dlv \ _docker \ _gardenctl \ _gh-label \ @@ -1448,8 +1457,10 @@ _go-licenses \ _gopherjs \ _goreleaser \ + _gup \ _helm \ _hugo \ + _incus \ _ignite \ _istioctl \ _k3s \ @@ -1490,6 +1501,7 @@ _upctl \ _vacuum \ _virtctl \ + _zarf \ _zitadel $(ss) gpgv \ gpgv2 @@ -1641,7 +1653,7 @@ $(ss) update-alternatives \ alternatives $(ss) _vault \ - _consul _nomad _packer _terraform + _bao _consul _nomad _packer _terraform _tofu $(ss) vipw \ vigr $(ss) vncviewer \
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/_nox -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/_nox
Changed
@@ -4,8 +4,8 @@ # This serves as a fallback in case the completion is not installed otherwise. eval -- "$( - bin_path=$(type -P "$1" 2>/dev/null | command sed 's,/^/*$,,') - $bin_path && PATH=$bin_path${PATH:+:$PATH} + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/^/*$,,') + $pathcmd && PATH=$pathcmd${PATH:+:$PATH} register-python-argcomplete --shell bash "$1" 2>/dev/null || register-python-argcomplete3 --shell bash "$1" 2>/dev/null )"
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/completions/_rg
Added
@@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd --generate complete-bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" --generate complete-bash 2>/dev/null)" + +# ex: filetype=sh
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/add_members -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/add_members
Changed
@@ -24,7 +24,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_xfunc list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/apt-get -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/apt-get
Changed
@@ -33,7 +33,7 @@ source) # Prefer `apt-cache` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x apt-cache packages _comp_compgen -a split -- "$(apt-cache dumpavail | _comp_awk '$1 == "Source:" { print $2 }' | sort -u)" @@ -79,7 +79,7 @@ --target-release | --default-release | -${noargopts}t) # Prefer `apt-cache` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen_split -- "$(apt-cache policy | command sed -ne \ 's/^ *release.* ,o=\(Debian\|Ubuntu\),a=\(\w*\).*/\2/p')" return
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/arch -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/arch
Changed
@@ -34,7 +34,7 @@ 1) # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists ;; 2)
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/change_pw -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/change_pw
Changed
@@ -9,7 +9,7 @@ -l | --listname) # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists return ;;
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/check_db -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/check_db
Changed
@@ -10,7 +10,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/clone_member -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/clone_member
Changed
@@ -9,7 +9,7 @@ -l | --listname) # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists return ;;
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/config_list -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/config_list
Changed
@@ -20,7 +20,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_xfunc list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/cryptsetup -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/cryptsetup
Changed
@@ -22,7 +22,7 @@ --skip | --iter-time | --timeout | --tries | -${noargopts}chslSbopitT) return ;; - --key-file | --master-key-file | --header-backup-file | -${noargopts}d) + --key-file | --master-key-file | --header | --header-backup-file | -${noargopts}d) _comp_compgen_filedir return ;;
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/curl -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/curl
Changed
@@ -22,7 +22,7 @@ --happy-eyeballs-timeout-ms | --hostpubmd5 | --keepalive-time | \ --limit-rate | --local-port | --login-options | --mail-auth | \ --mail-from | --mail-rcpt | --max-filesize | --max-redirs | \ - --max-time | --pass | --proto | --proto-default | --proto-redir | \ + --max-time | --pass | --proto | --proto-redir | \ --proxy-ciphers | --proxy-pass | --proxy-service-name | \ --proxy-tls13-ciphers | --proxy-tlspassword | --proxy-tlsuser | \ --proxy-user | --proxy1.0 | --quote | --range | --referer | \ @@ -127,6 +127,9 @@ _comp_compgen_known_hosts -- "$cur" return ;; + --proto-default) + _comp_compgen_split "$("$1" --version 2>/dev/null | command sed -e '/Protocols/!d' -e 's/Protocols://')" + ;; --pubkey) _comp_compgen -x ssh identityfile pub return
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/completions/env
Added
@@ -0,0 +1,56 @@ +# bash completion for env(1) -*- shell-script -*- + +_comp_cmd_env() +{ + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + + local i noargopts='!(-*|*uCS*)' + for ((i = 1; i <= cword; i++)); do + if ${wordsi} != -* || ${wordsi} == -?(-) && i -lt cword ; then + ${wordsi} == -?(-) && ((i++)) + for (( ; i <= cword; i++)); do + if ${wordsi} != *=* ; then + _comp_command_offset "$i" + return + fi + done + break + fi + + # shellcheck disable=SC2254 + ${wordsi} == @(--@(unset|chdir|split-string)|-${noargopts}uCS) && + ((i++)) + done + + # shellcheck disable=SC2254 + case "$prev" in + --unset | -${noargopts}u) + _comp_compgen -- -A variable + return + ;; + --chdir | -${noargopts}C) + _comp_compgen_filedir -d + return + ;; + --split-string | -${noargopts}S) + return + ;; + --block-signal | --default-signal | --ignore-signal) + # TODO signals, but only if completing with a =SIG + ;; + esac + + $was_split && return + + _comp_variable_assignments "$cur" && return + + if $cur == -* ; then + _comp_compgen_help || _comp_compgen_usage + ${COMPREPLY-} == *= && compopt -o nospace + return + fi +} && + complete -F _comp_cmd_env env + +# ex: filetype=sh
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/find_member -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/find_member
Changed
@@ -9,7 +9,7 @@ -l | -x | --listname | --exclude) # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists return ;;
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/fio -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/fio
Changed
@@ -2,7 +2,7 @@ _comp_cmd_fio__compgen_engines() { - _comp_compgen_split -l -- "$("$1" --enghelp 2>/dev/null | command sed -ne '/^:space:/p'))" + _comp_compgen_split -F $'\t\n' -- "$("$1" --enghelp 2>/dev/null | command sed -ne '/^:space:/p')" } _comp_cmd_fio()
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/inject -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/inject
Changed
@@ -9,7 +9,7 @@ -l | --listname) # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists return ;;
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/ip -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/ip
Changed
@@ -8,10 +8,45 @@ _comp_cmd_ip__netns() { - _comp_compgen_split -- "$( + local unquoted + _comp_split -l unquoted "$( { ${1-ip} -c=never netns list 2>/dev/null || ${1-ip} netns list - } | _comp_awk '{print $1}' + } | command sed -e 's/ (.*//' + )" + # namespace names can have spaces, so we quote all of them if needed + local ns quoted=() + for ns in "${unquoted@}"; do + local namespace + printf -v namespace '%q' "$ns" + quoted+=("$namespace") + done + ((${#quoted@})) && _comp_compgen -- -W '"${quoted@}"' +} + +_comp_cmd_ip__link_types() +{ + _comp_compgen_split -- "$( + { + ${1-ip} -c=never link help || ${1-ip} link help + } 2>&1 | command sed -e \ + '/TYPE := /,/}/!d' -e \ + 's/.*{//' -e \ + 's/}.*//' -e \ + 's/|/ /g' + )" +} + +_comp_cmd_ip__neigh_states() +{ + _comp_compgen_split -- "$( + { + ${1-ip} -c=never neigh help || ${1-ip} neigh help + } 2>&1 | command sed -e \ + '/STATE := /,/}/!d' -e \ + 's/.*{//' -e \ + 's/}.*//' -e \ + 's/|/ /g' )" } @@ -47,7 +82,7 @@ ${wordssubcword} == -b?(atch) && return $has_cmd && subcmd=${wordssubcword} && break ${wordssubcword} != -* && - ${wordssubcword - 1} != -@(f?(amily)|rc?(vbuf)) && + ${wordssubcword - 1} != -@(f?(amily)|rc?(vbuf)|n?(etns)) && cmd=${wordssubcword} has_cmd=set done @@ -66,7 +101,7 @@ *) _comp_compgen_split -- "help $( { - $1 -c=never help || $1 help + "$1" -c=never help || "$1" help } 2>&1 | command sed -e \ '/OBJECT := /,/}/!d' -e \ 's/.*{//' -e \ @@ -86,22 +121,22 @@ add) # TODO ;; + afstats) + if $prev == dev ; then + _comp_compgen_available_interfaces + else + _comp_compgen -- -W 'dev' + fi + ;; delete) - case $((cword - subcword)) in - 1) - _comp_compgen_available_interfaces - ;; - 2) - _comp_compgen -- -W 'type' - ;; - 3) - $prev == type && - _comp_compgen -- -W 'vlan veth vcan dummy ifb - macvlan can' - ;; - esac + if $prev == type ; then + _comp_cmd_ip__link_types "$1" + else + _comp_compgen_available_interfaces + _comp_compgen -a -- -W 'type' + fi ;; - set) + set | change) if ((cword - subcword == 1)); then _comp_compgen_available_interfaces else @@ -132,9 +167,20 @@ _comp_cmd_ip__iproute2_etc group fi ;; + property) + if ((cword - 1 == subcword)); then + _comp_compgen -- -W 'add del' + elif $prev == dev ; then + _comp_compgen_available_interfaces + elif $prev == altname ; then + return + else + _comp_compgen -- -W 'dev altname' + fi + ;; *) ((cword == subcword)) && - _comp_compgen -- -W 'help add delete set show' + _comp_compgen -- -W 'help add change delete set show property afstats' ;; esac ;; @@ -142,13 +188,24 @@ a | addr | address) case $subcmd in add | change | replace) - if $prev == dev ; then - _comp_compgen_available_interfaces - elif $prev == scope ; then - _comp_cmd_ip__iproute2_etc rt_scopes - else - : # TODO - fi + case $prev in + dev | label) + _comp_compgen_available_interfaces + ;; + scope) + _comp_cmd_ip__iproute2_etc rt_scopes + ;; + broadcast | anycast | peer | metric) + : + ;; + valid_lft | preferred_lft) + _comp_compgen -- -W 'forever' + ;; + *) + _comp_compgen -- -W 'anycast autojoin broadcast dev home label scope nodad metric mngtmpaddr + noprefixroute valid_lft peer preferred_lft' + ;; + esac ;; del) if $prev == dev ; then @@ -164,11 +221,13 @@ _comp_compgen_available_interfaces _comp_compgen -a -- -W 'dev scope to label dynamic permanent tentative deprecated dadfailed temporary - primary secondary up' + primary secondary up type' elif $prev == dev ; then _comp_compgen_available_interfaces elif $prev == scope ; then _comp_cmd_ip__iproute2_etc rt_scopes + elif $prev == type ; then + _comp_cmd_ip__link_types "$1" fi ;; *) @@ -181,13 +240,16 @@ addrlabel) case $subcmd in - list | add | del | flush) + add | del) if $prev == dev ; then _comp_compgen_available_interfaces + elif $prev == prefix || $prev == label ; then + : # TODO - Is there a way to complete these? else - : # TODO + _comp_compgen -- -W 'dev prefix label' fi ;; + list | flush | help) ;; *) ((cword == subcword)) && _comp_compgen -- -W 'help list add del flush' @@ -197,28 +259,58 @@ r | route) case $subcmd in - list | flush) - if $prev == proto ; then - _comp_cmd_ip__iproute2_etc rt_protos - else - : # TODO
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/iperf -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/iperf
Changed
@@ -5,16 +5,16 @@ local cur prev words cword was_split comp_args _comp_initialize -s -n : -- "$@" || return - local noargopts='!(-*|*ilpwMXbntLPTZCkOSAfIoFBcxy*)' + local noargopts='!(-*|*ilpwMXbntLPTZCkOAfIoFBcxy*)' # shellcheck disable=SC2254 case $prev in --help | --version | --interval | --len | --port | --window | --mss | --bandwidth | \ --num | --time | --listenport | --parallel | --ttl | --linux-congestion | --omit | \ --congestion | --bytes | --blockcount | --cport | --set-mss | --flowlabel | \ - --title | --tos | --affinity | --rcv-timeout | --server-bitrate-limit | \ + --title | --affinity | --rcv-timeout | --server-bitrate-limit | \ --idle-timeout | --time-skew-threshold | --xbind | --nstreams | --connect-timeout | \ --bitrate | --pacing-timer | --fq-rate | --length | --dscp | --extra-data | \ - --username | -${noargopts}hvilpwMXbntLPTZCkOSA) + --username | -${noargopts}hvilpwMXbntLPTZCkOA) return ;; --format | -${noargopts}f) @@ -59,6 +59,10 @@ _comp_compgen_filedir log return ;; + --tos | -${noargopts}S) + _comp_compgen -- -W '{0..255}' + return + ;; --rsa-private-key-path | --rsa-public-key-path) _comp_compgen_filedir pem return
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/list_admins -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/list_admins
Changed
@@ -10,7 +10,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/list_members -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/list_members
Changed
@@ -28,7 +28,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/list_owners -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/list_owners
Changed
@@ -10,7 +10,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/mysql -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/mysql
Changed
@@ -24,7 +24,7 @@ # Prefer `mysqlshow` in the same dir as the command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH local noargopts='!(-*|*uDhSPeI*)' # shellcheck disable=SC2254
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/newlist -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/newlist
Changed
@@ -19,7 +19,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi } &&
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/perl -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/perl
Changed
@@ -107,7 +107,7 @@ # Prefer `perl` in the same dir in utility functions local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH case $prev in -*hVnoMwL)
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/pkgutil -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/pkgutil
Changed
@@ -1,6 +1,9 @@ # pkgutil completion -*- shell-script -*- # Copyright 2006 Yann Rouillard <yann@opencsw.org> +# At least macOS pkgutil is different + $OSTYPE == *solaris* || return 1 + _comp_cmd_pkgutil__url2catalog() { local filename="$1"
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/pydoc -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/pydoc
Changed
@@ -25,7 +25,7 @@ if ! _comp_looks_like_path "$cur"; then # Prefer python in the same dir for resolving modules local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -ax python modules fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/remove_members -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/remove_members
Changed
@@ -20,7 +20,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/rmlist -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/rmlist
Changed
@@ -10,7 +10,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/rpm -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/rpm
Changed
@@ -262,7 +262,7 @@ --target | --eval | -${noargopts}E | --buildpolicy) # Prefer `rpm` in the same dir in utility functions local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH ;;& --target) _comp_cmd_rpm__buildarchs
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/ssh -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/ssh
Changed
@@ -404,7 +404,7 @@ # Prefer `ssh` from same dir for resolving options, etc local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_xfunc_ssh_compgen_suboption_check && return @@ -469,7 +469,7 @@ _comp_xfunc_scp_compgen_remote_files() { # remove backslash escape from the first colon - cur=${cur/\\:/:} + local cur=${cur/\\:/:} local _userhost=${cur%%?(\\):*} local _path=${cur#*:} @@ -499,7 +499,7 @@ command sed -e 's/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e 's/*@|=$//g' \ -e 's/^\/$/& /g') fi - _comp_compgen_split -l -- "$_files" + _comp_compgen -R split -l -- "$_files" } # @deprecated 2.12 use `_comp_compgen -ax ssh remote_files` instead @@ -556,7 +556,7 @@ # Prefer `ssh` from same dir for resolving options, remote files, etc local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_xfunc_ssh_compgen_suboption_check && { ((${#COMPREPLY@})) && COMPREPLY=("${COMPREPLY@/%/ }")
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/ssh-add -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/ssh-add
Changed
@@ -10,6 +10,19 @@ _comp_compgen -- -W 'md5 sha256' return ;; + -*H) + _comp_compgen_filedir + return + ;; + -*h) + # TODO should we try supporting more types of constraints? + if $cur == *@* ; then + _comp_complete_user_at_host "$@" + else + _comp_compgen_known_hosts -- "$cur" + fi + return + ;; -*t) return ;; @@ -17,14 +30,14 @@ _comp_compgen_filedir return ;; - -*se) + -*S | -*se) _comp_compgen_filedir so return ;; esac if $cur == -* ; then - _comp_compgen_help -- '-?' + _comp_compgen_usage -- '-?' || _comp_compgen_help -- '-?' return fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/ssh-copy-id -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/ssh-copy-id
Changed
@@ -7,7 +7,7 @@ # Prefer `ssh` from same dir for resolving options, etc local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x ssh suboption_check && return @@ -16,7 +16,11 @@ _comp_compgen -x ssh identityfile pub return ;; - -p) + -p | -t) + return + ;; + -F) + _comp_compgen_filedir return ;; -o)
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/ssh-keygen -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/ssh-keygen
Changed
@@ -5,11 +5,14 @@ local cur prev words cword comp_args _comp_initialize -n := -- "$@" || return + local IFS=$' \t\n' # for ${words*} + local noargopts='!(-*|* aCIJjMNPSVWzbEFRDwfGKsTmnOrtY*)' + # shellcheck disable=SC2254 case $prev in - -*aCIJjMNPSVWz) + -${noargopts}aCIJjMNPSVWz) return ;; - -*b) + -${noargopts}b) local -a sizes=() case "${words*}" in *" -t dsa"?( *)) @@ -26,28 +29,28 @@ _comp_compgen -- -W '"${sizes@}"' return ;; - -*E) + -${noargopts}E) _comp_compgen -- -W 'md5 sha256' return ;; - -*FR) + -${noargopts}FR) # TODO: trim this down to actual entries in known hosts files _comp_compgen_known_hosts -- "$cur" return ;; - -*Dw) + -${noargopts}Dw) _comp_compgen_filedir so return ;; - -*fGKsT) + -${noargopts}fGKsT) _comp_compgen_filedir return ;; - -*m) + -${noargopts}m) _comp_compgen -- -W 'PEM PKCS8 RFC4716' return ;; - -*n) + -${noargopts}n) ${words*} != *\ -*Y\ * || return if ${words*} == *\ -*h\ * ; then _comp_compgen_known_hosts -- "${cur##*,}" @@ -58,19 +61,41 @@ fi return ;; - -*O) + -${noargopts}O) if $cur != *=* ; then - _comp_compgen -- -W 'clear critical: extension: force-command= - no-agent-forwarding no-port-forwarding no-pty no-user-rc - no-x11-forwarding permit-agent-forwarding - permit-port-forwarding permit-pty permit-user-rc - permit-X11-forwarding no-touch-required source-address= - verify-required - - lines= start-line= checkpoint= memory= start= generator= - - application= challenge= device= no-touch-required resident - user= write-attestation=' + local -a opts=() + case ${words*} in + *\ -${noargopts}M\ *) + opts=( + lines= start-line= checkpoint= memory= start= + generator= + ) + ;; + *\ -${noargopts}r\ *) + opts=(hashalg=) + ;; + *\ -${noargopts}s\ *) + opts=( + clear critical: extension: force-command= + no-agent-forwarding no-port-forwarding no-pty + no-user-rc no-x11-forwarding permit-agent-forwarding + permit-port-forwarding permit-pty permit-user-rc + permit-X11-forwarding no-touch-required + source-address= verify-required + ) + ;; + *\ -${noargopts}t\ +(a-z0-9)-sk\ *) + opts=( + application= challenge= device= no-touch-required + resident user= verify-required write-attestation= + ) + ;; + *\ -${noargopts}Y\ *) + opts=(hashalg= print-pubkey verify-time) + ;; + esac + ((${#opts@})) && + _comp_compgen -- -W '"${opts@}"' ${COMPREPLY-} == *:= && compopt -o nospace _comp_ltrim_colon_completions "$cur" @@ -90,18 +115,31 @@ user=*) _comp_compgen -c "${cur#*=}" -- -u ;; + hashalg=*) + local -a args=() + case ${words*} in + *\ -*Y\ *) + args=(sha256 sha512) + ;; + *\ -*r\ *) + args=(sha1 sha256) + ;; + esac + ((${#args@})) && + _comp_compgen -c "${cur#*=}" -- -W '"${args@}"' + ;; esac fi return ;; - -*r) - ${words*} != *\ -*Y\ * || _comp_compgen_filedir + -${noargopts}r) + ${words*} != *\ -${noargopts}Y\ * || _comp_compgen_filedir return ;; - -*t) + -${noargopts}t) # Prefer `ssh` from same dir for resolving options, etc local pathcmd protocols - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -v protocols -x ssh query protocol-version local types='dsa ecdsa ecdsa-sk ed25519 ed25519-sk rsa' if ${protocols*} == *1* ; then @@ -110,7 +148,7 @@ _comp_compgen -- -W "$types" return ;; - -*Y) + -${noargopts}Y) _comp_compgen -- -W 'find-principals check-novalidate sign verify' return ;; @@ -122,7 +160,7 @@ _comp_compgen_help -- "-?" # OpenSSH < 7 fi - if ${words*} == *\ -*s\ * ; then + if ${words*} == *\ -${noargopts}s\ * ; then _comp_compgen -a filedir pub fi } &&
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/ssh-keyscan -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/ssh-keyscan
Changed
@@ -3,7 +3,7 @@ _comp_cmd_ssh_keyscan() { local cur prev words cword comp_args - _comp_initialize -- "$@" || return + _comp_initialize -n = -- "$@" || return local ipvx @@ -18,6 +18,20 @@ _comp_compgen_filedir return ;; + -*O) + case $cur in + hashalg=*) + cur=${cur#*=} + _comp_compgen -- -W 'sha1 sha256' + ;; + *=*) ;; + *) + _comp_compgen -- -W 'hashalg=' + compopt -o nospace + ;; + esac + return + ;; -*p | -*T) return ;;
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/sync_members -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/sync_members
Changed
@@ -24,7 +24,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/tar -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/tar
Changed
@@ -31,7 +31,7 @@ # FIXME: timeout on tarball listing # FIXME: cache 'tar --help' parsing results into global variables # FIXME: at least 'tar -<tab>' should show some helping text (apart from just -# pure option advices) +# pure option advice) # FIXME: short option completion should be more intuitive # - verbose mode option should be advised multiple times # - mode option should be advised only once
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/withlist -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/withlist
Changed
@@ -10,7 +10,7 @@ else # Prefer `list_lists` in the same dir as command local pathcmd - pathcmd=$(type -P "$1") && local PATH=${pathcmd%/*}:$PATH + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH _comp_compgen -x list_lists mailman_lists fi
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/xmllint -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/xmllint
Changed
@@ -46,7 +46,7 @@ return fi - _comp_compgen_filedir '@(*ml|htm|svg?(z)|xsdl|rng|wsdl|jnlp|tld|dbk|docbook|page)?(.gz)' + _comp_compgen_filedir '@(*ml|htm|svg?(z)|xsdl|rng|wsdl|jnlp|tld|dbk|docbook|page|rss)?(.gz)' } && complete -F _comp_cmd_xmllint xmllint
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/completions/xmlwf -> _service:tar_scm:bash-completion-2.14.0.tar.xz/completions/xmlwf
Changed
@@ -24,7 +24,7 @@ return fi - _comp_compgen_filedir '@(*ml|htm|svg|xsdl|rng|wsdl|jnlp|tld|dbk|docbook|page)' + _comp_compgen_filedir '@(*ml|htm|svg|xsdl|rng|wsdl|jnlp|tld|dbk|docbook|page|rss)' } && complete -F _comp_cmd_xmlwf xmlwf
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/configure -> _service:tar_scm:bash-completion-2.14.0.tar.xz/configure
Changed
@@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.71 for bash-completion 2.12.0. +# Generated by GNU Autoconf 2.71 for bash-completion 2.14.0. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, @@ -608,8 +608,8 @@ # Identity of this package. PACKAGE_NAME='bash-completion' PACKAGE_TARNAME='bash-completion' -PACKAGE_VERSION='2.12.0' -PACKAGE_STRING='bash-completion 2.12.0' +PACKAGE_VERSION='2.14.0' +PACKAGE_STRING='bash-completion 2.14.0' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1244,7 +1244,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures bash-completion 2.12.0 to adapt to many kinds of systems. +\`configure' configures bash-completion 2.14.0 to adapt to many kinds of systems. Usage: $0 OPTION... VAR=VALUE... @@ -1311,7 +1311,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of bash-completion 2.12.0:";; + short | recursive ) echo "Configuration of bash-completion 2.14.0:";; esac cat <<\_ACEOF @@ -1391,7 +1391,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -bash-completion configure 2.12.0 +bash-completion configure 2.14.0 generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. @@ -1428,7 +1428,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by bash-completion $as_me 2.12.0, which was +It was created by bash-completion $as_me 2.14.0, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw @@ -2379,7 +2379,7 @@ # Define the identity of the package. PACKAGE='bash-completion' - VERSION='2.12.0' + VERSION='2.14.0' printf "%s\n" "#define PACKAGE \"$PACKAGE\"" >>confdefs.h @@ -3258,7 +3258,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by bash-completion $as_me 2.12.0, which was +This file was extended by bash-completion $as_me 2.14.0, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -3313,7 +3313,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ -bash-completion config.status 2.12.0 +bash-completion config.status 2.14.0 configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\"
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/configure.ac -> _service:tar_scm:bash-completion-2.14.0.tar.xz/configure.ac
Changed
@@ -1,5 +1,5 @@ AC_PREREQ(2.60) -AC_INIT(bash-completion, 2.12.0) dnl x-release-please-version +AC_INIT(bash-completion, 2.14.0) dnl x-release-please-version dnl tar-pax for portable UTF-8 handling AM_INIT_AUTOMAKE( foreign dist-xz no-dist-gzip tar-pax -Wall -Wno-portability -Werror
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/doc/Makefile.am -> _service:tar_scm:bash-completion-2.14.0.tar.xz/doc/Makefile.am
Changed
@@ -1,4 +1,5 @@ EXTRA_DIST = \ + api-and-naming.md \ configuration.md \ styleguide.md \ testing.md
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/doc/Makefile.in -> _service:tar_scm:bash-completion-2.14.0.tar.xz/doc/Makefile.in
Changed
@@ -197,6 +197,7 @@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ + api-and-naming.md \ configuration.md \ styleguide.md \ testing.md
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/doc/api-and-naming.md
Added
@@ -0,0 +1,232 @@ +# API and naming + +## General API conventions + +Most of the functions in bash-completion generate completions and directly +inject them to the `COMPREPLY` array variable, as required for completions to +work. + +Most other functions make use of "output" variables, i.e. assign values to +them. The name of an output variable should be basically in lowercase. +Consult the commentary before each function in the source to find out the +specific names. `local`izing output variables before invoking a function that +populates them is the caller's responsibility. Note that if calling multiple +functions that assign output to the same variable during one completion +function run, each result should be copied to another variable between the +calls to avoid it possibly being overwritten and lost on the next call. +The variables should also be ensured to be clear before each call that +references the value, variable name, or their existence, typically by `unset +-v`ing them when multiple such calls are used, to avoid them interfering with +each other. + +The most common output variable is named `REPLY`. The use of the uppercase is +unconventional, but this choice of the name is intended to be consistent with +the value substitutions `${| func; }`, which is originally supported by mksh +and will be supported by Bash >= 5.3. The value substitutions are replaced by +the contents of the output variable `REPLY` set by `func`. Although we cannot +currently assume Bash 5.3 in the codebase, we can switch to the value +substitutions at the point Bash <= 5.2 disappears from the market. + +Everything in fallback completion files (ones starting with an underscore) +is considered private and is to be named accordingly. Fallback files are not +intended to be explicitly used with `_comp_xfunc`, and completion files having +precedence over them may have a different API. + +## Availability + +All public API functions and variables are marked with a `@since VERSION` +comment, where `VERSION` is the bash-completion version the thing was +introduced in. + +Similarly, deprecated functions and variables are either marked with a +`@deprecated VERSION ...` comment, or deprecated using the +`_comp_deprecate_func VERSION OLD_NAME NEW_NAME` function. +`VERSION` in both cases is the bash-completion version the thing was +deprecated in. + +## Naming + +Due to its nature, bash-completion adds a number of functions and variables in +the shell's environment. + +| | `bash_completion` | `completions/*` | +|:------------------------------------|:--------------------|:--------------------------------------------------------------------------------------| +| public configuration variables | `BASH_COMPLETION_*` | `BASH_COMPLETION_CMD_${Command^^}_${Config^^}` | +| private non-local variables | `_comp__*` | `_comp_cmd_${Command}__${Data}` | +| private non-local mutable variables | `_comp__*_mut_*` | `_comp_cmd_${Command}__mut_${Data}` | +| exporter function local variables | `_*` (not `_comp*`) | `_*` (not `_comp*`) | +| public/exported functions | `_comp_*` | `_comp_xfunc_${Command}_${Utility}` (functions for use with `_comp_xfunc`) | +| - completers (for `complete -F`) | `_comp_complete_*` | `_comp_cmd_${Command}` | +| - generators | `_comp_compgen_*` | `_comp_xfunc_${Command}_compgen_${Name}` (generators for use with `_comp_compgen -x`) | +| private/internal functions | `_comp__*` | `_comp_cmd_${Command}__${Utility}` (utility functions) | +| - generators | | `_comp_cmd_${Command}__compgen_${Name}` (generators for use with `_comp_compgen -i`) | + +`${Command}` refers to a command name (with characters not allowed in POSIX +function or variable names replaced by an underscore), `${Config}` the name of +a configurable thing, `^^` means uppercase, `${Data}` is an identifier for the +data contained in the variable, and `${Utility}` describes the typical usage of +the function. + +Variables and functions affecting multiple completions are usually defined +in the main `bash_completion` file and do not require any additional files to +be sourced. Variables and functions in command specific completion files in +`completions/*` follow a slightly different naming scheme; they include +`cmd` in their name as well as the name of the command. + +Public configuration variables are shell ones that affect the runtime behavior +of various completions. As a rule of thumb, we lean towards not providing +customizability but rather strive to provide great completion behavior out of +the box. But there are some, see configuration(configuration.md). + +Variables and functions whose name contains a double underscore (`__`) anywhere +in their name are private implementation details, not part of the stable API, +and not intended to be used outside of their defining context. Internally, the +double underscores serve as privacy scope delimiters; there can be more than one +pair of them in a name, and functions and variables are intended to reference +and call other functions and variables within that scope, one level deep, +sharing a common prefix. For example, a function named `_comp_foo` is "allowed" +to access `_comp_foo__*` where `*` does not contain any double underscores, +i.e. it should not access `_comp_foo__something__*` despite the common prefix. + +Private non-local variables are considered readonly by default. When a +completion function needs to change variables for e.g. caching purposes, the +variables should contain the infix `*_mut_*` anywhere in their names. This is +needed to tell the test framework to allow these variables changing. +Nevertheless, the completion results should be consistent among different calls +and unaffected by the state of the cache variables when it is called. + +Internal local variables of functions that "export" their results using a +variable name that is passed in start with an underscore and do not start with +`_comp`. The variable names that are passed in for this purpose must not start +with an underscore. + +Functions with names prefixed with `_comp_xfunc_` are intended to be used +through the `_comp_xfunc` function from files other than the one they are +defined in. From the same file they can be used directly using their complete +name. + +Function names start with an underscore in order to avoid them being +included in completions of command names. (Except naturally when a command +starting with an underscore is being completed.) The underscore prefix does +not have anything to do with whether the thing is considered public or +private in the API, nor anything else really. + +The `BASH_COMPLETION_` prefix provides a namespace and makes it clear what +these variables relate to. The `_comp` in other names serves a similar purpose, +but because these are used a lot in the code (unlike the public configuration +variables), using something shorter is beneficial. We hope and believe this is +distinctive and clash free enough. + +It is known that a lot of functions and variables in the tree do not follow +these naming rules yet. Things introduced after version 2.11 should, and we are +evaluating our options for handling older ones. + +## Exported functions (xfunc) + +Exported functions (xfunc) are the functions defined in completion files for +specific commands but exposed to other completion files. The xfuncs have the +name `_comp_xfunc_CMD_NAME` where `CMD` is the name of the associated command, +and `NAME` is the name of the utility. The other functions defined in specific +completion files are considered private and should not be called outside the +file. + +The xfuncs can be called by `_comp_xfunc CMD NAME ARGS` from external files. +The xfuncs are supposed to be directly called as `_comp_xfunc_CMD_NAME ARGS` +from the same file where they are defined, or if they wrap a `_comp_cmd_NAME__*` +function, that one should be called directly instead. + +Note: The name `xfunc` was initially the name of a utility function, `_xfunc`, +to call "eXternal FUNCtions" that are defined in other completion files. The +concept is later extended to also mean "eXported". + +## Generator functions + +The generator functions, which have names of the form `_comp_compgen_NAME`, are +used to generate completion candidates. A generator function is supposed to be +called by `_comp_compgen OPTS NAME ARGS` where `OPTS = -aRl|-v var|-c cur|-C +dir|-F sep` are the options to modify the behavior (see the code comment of +`_comp_compgen` for details). When there are no `opts`, the generator function +is supposed to be directly called as `_comp_compgen_NAME ARGS`. The result is +stored in the target variable (which is `COMPREPLY` by default but can be +specified by `-v var` in `OPTS`). + +### Implementing a generator function + +To implement a generator function, one should generate completion candidates by +calling `_comp_compgen` or other generators. + +To avoid conflicts with the options specified to `_comp_compgen`, one should +not directly modify or reference the target variable. When post-filtering is +needed, store them in a local array, filter them, and finally append them by +`_comp_compgen -- -W '"${_arr@}"'`. To split the output of commands and +append the results to the target variable, use `_comp_compgen_split -- "$(cmd +...)"` instead of using `_comp_split COMPREPLY "$(cmd ...)"`. + +A generator function should replace the existing content of the variable by +default. When the appending behavior is favored, the caller should specify it +through `_comp_compgen -a NAME`. The generator function does not need to +process it because internal `_comp_compgen` calls automatically reflect the +option `-a` specified to the outer calls of `_comp_compgen`. + +The exit status is implementation-defined. + +- The `_comp_compgen -- COMPGEN_ARGS` returns whether there is at least one + completion. This is useful when one wants to reuse the array content with + `"${tmp@}"` avoiding `nounset` error. +- Some use other rules for the exit status. E.g., `help` and `usage` return + whether there were options *before* filtering by cur. This is used for + `_comp_compgen_help || _comp_compgen_usage`. + +Whether to clear the target variable on runtime error (when `-a` is not +specified in `OPTS`) is implementation-defined. On the other hand, the +generator function should not leave any side effects in the target variable on +usage error. Note that the target variable might be cleared by the internal +calls of `_comp_compgen`. To explicitly clear the target variable, +`_comp_compgen_set` can be called without arguments. + +Exported generators are defined with the names `_comp_xfunc_CMD_compgen_NAME` +and called by `_comp_compgen opts -x CMD NAME args`. Internal generators are +defined with the names `_comp_cmd_CMD__compgen_NAME` and called by +`_comp_compgen opts -i CMD NAME args`. + +#### Local variables of generator and `_comp_compgen -U var` + +A generator should basically define local variables with the names starting +with `_`. However, a generator sometimes needs to use local variable names +that do not start with `_`. When the child generator call with a variable name +(such as `local var; _comp_compgen -v var`) is used within the generator, the +local variable can unexpectedly mask a local variable of the upper call. +
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/pyproject.toml -> _service:tar_scm:bash-completion-2.14.0.tar.xz/pyproject.toml
Changed
@@ -1,7 +1,7 @@ tool.ruff line-length = 79 target-version = "py37" -lint.select = "E", "F", "B" +lint.select = "E", "F", "B", "I" lint.ignore = # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules # (keep order of ignores here same as ^there for maintainability) @@ -21,8 +21,6 @@ "ISC002", "E501", +lint.isort.known-first-party = "conftest" +lint.isort.known-third-party = "pexpect", "pytest" fix = true - -tool.ruff.lint.isort -known-first-party = "conftest" -known-third-party = "pexpect", "pytest"
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/fallback/completions/nox -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/fallback/completions/nox
Changed
@@ -4,8 +4,8 @@ # This serves as a fallback in case the completion is not installed otherwise. eval -- "$( - bin_path=$(type -P "$1" 2>/dev/null | command sed 's,/^/*$,,') - $bin_path && PATH=$bin_path${PATH:+:$PATH} + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/^/*$,,') + $pathcmd && PATH=$pathcmd${PATH:+:$PATH} register-python-argcomplete --shell bash "$1" 2>/dev/null || register-python-argcomplete3 --shell bash "$1" 2>/dev/null )"
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/test/fixtures/_comp_load/prefix1/bin/cmd1
Changed
(renamed from test/fixtures/_comp_load/bin/cmd1)
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/test/fixtures/_comp_load/prefix1/sbin/cmd2
Changed
(renamed from test/fixtures/_comp_load/bin/cmd2)
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/conftest.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/conftest.py
Changed
@@ -381,8 +381,8 @@ try: # Allow _comp_load to fail so we can test completions # that are directly loaded in bash_completion without a separate file. - assert_bash_exec(bash, "_comp_load %s || :" % cmd) - assert_bash_exec(bash, "complete -p %s &>/dev/null" % cmd) + assert_bash_exec(bash, "_comp_load -- %s || :" % cmd) + assert_bash_exec(bash, "complete -p -- %s &>/dev/null" % cmd) except AssertionError: return False return True @@ -601,9 +601,9 @@ def _unprotect_variable(self, varname: str): if varname not in self.saved_variables: - self.saved_variables - varname - = bash_env_saved.saved_state.ChangesDetected + self.saved_variablesvarname = ( + bash_env_saved.saved_state.ChangesDetected + ) self._copy_variable( varname, "%s_OLDVAR_%s" % (self.prefix, varname) ) @@ -695,9 +695,9 @@ def save_variable(self, varname: str): self._unprotect_variable(varname) - self.saved_variables - varname - = bash_env_saved.saved_state.ChangesIgnored + self.saved_variablesvarname = ( + bash_env_saved.saved_state.ChangesIgnored + ) # TODO: We may restore the "export" attribute as well though it is # not currently tested in "diff_env"
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/test_curl.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/test_curl.py
Changed
@@ -27,6 +27,10 @@ assert completion == "d/" assert not completion.endswith(" ") + @pytest.mark.complete("curl --proto-default ", require_cmd=True) + def test_proto_default(self, completion): + assert completion + @pytest.mark.complete("curl --dont-fail-in-unset-mode") def test_unknown_option(self, completion): # Just see that it does not error out
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/test_env.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/test_env.py
Changed
@@ -1,7 +1,44 @@ import pytest +from conftest import assert_complete + class TestEnv: @pytest.mark.complete("env --", require_longopt=True) def test_1(self, completion): assert completion + + @pytest.mark.complete("env __unknown_variable__=") + def test_unknown_variable_falls_back_to_filedir(self, completion): + assert "shared/" in completion + + @pytest.mark.complete("env LANG=", xfail="! locale -a &>/dev/null") + def test_lang_envvar(self, completion): + assert any(x == "C" or x.startswith("C.") for x in completion) + + @pytest.mark.parametrize( + "opts", + + "", + "foo=bar", + "--debug", + "--debug foo=bar", + "-", + "- foo=bar", + , + ) + def test_command(self, bash, opts): + completion = assert_complete(bash, "env %s s" % opts) + assert completion == "h" or "sh" in completion + + @pytest.mark.parametrize( + "opts", + + "foo=bar --non-existent", + "- --non-existent", + "-- --non-existent", + , + ) + def test_option_like_command(self, bash, opts): + completion = assert_complete(bash, "env %s s" % opts) + assert not (completion == "h" or "sh" in completion)
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/test_fio.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/test_fio.py
Changed
@@ -23,6 +23,8 @@ def test_enghelp(self, completion): """Test --enghelp parsing.""" assert completion + assert all(x == x.strip() for x in completion) + assert all(")" not in x for x in completion) @pytest.mark.complete("fio --unlink=", require_cmd=True) def test_cmdhelp_boolean(self, completion):
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/test_ip.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/test_ip.py
Changed
@@ -15,6 +15,23 @@ assert completion @pytest.mark.complete( + "ip stats show group ", + require_cmd=True, + skipif="ip stats help 2>/dev/null; (( $? != 255 ))", + ) + def test_stats(self, completion): + # "link" was one of the first groups added, should always be there + assert "link" in completion + + @pytest.mark.complete( + "ip neigh show nud ", + require_cmd=True, + skipif="ip neigh help 2>&1 | grep 'STATE :=' > /dev/null; (( $? != 0 ))", + ) + def test_neigh_state(self, completion): + assert "stale" in completion + + @pytest.mark.complete( "ip monitor ", require_cmd=True, skipif="ip monitor help 2>/dev/null; (( $? != 255 ))", @@ -23,6 +40,23 @@ assert "neigh" in completion assert "all" in completion + @pytest.mark.complete("ip netconf ") + def test_netconf(self, completion): + assert "show" in completion + + @pytest.mark.complete("ip link property add ") + def test_link_property(self, completion): + assert "altname" in completion + assert "dev" in completion + + @pytest.mark.complete( + "ip addr show type ", + require_cmd=True, + skipif="ip link help 2>/dev/null; (( $? != 255 ))", + ) + def test_addr_type(self, completion): + assert "bridge" in completion + @pytest.mark.complete("ip -", require_cmd=True) def test_options(self, completion): assert "-family" in completion
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/test_java.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/test_java.py
Changed
@@ -1,6 +1,6 @@ import pytest -from conftest import is_bash_type, assert_bash_exec, bash_env_saved +from conftest import assert_bash_exec, bash_env_saved, is_bash_type @pytest.mark.bashcomp(
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/test_perldoc.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/test_perldoc.py
Changed
@@ -9,7 +9,11 @@ assert "fixtures/" not in completion # Our fixtures/ dir assert not x for x in completion if "File::File::" in x - @pytest.mark.complete("perldoc -", require_cmd=True) + @pytest.mark.complete( + "perldoc -", + require_cmd=True, + skipif="! perldoc -V &>/dev/null", + ) def test_2(self, completion): assert completion
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/test_ssh_keygen.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/test_ssh_keygen.py
Changed
@@ -55,11 +55,15 @@ assert not completion @pytest.mark.complete("ssh-keygen -O ") - def test_O(self, completion): + def test_bare_O(self, completion): + assert not completion + + @pytest.mark.complete("ssh-keygen -s -O ") + def test_s_O(self, completion): assert completion assert any(x.endswith("=") for x in completion) - @pytest.mark.complete("ssh-keygen -O force-command=bas") + @pytest.mark.complete("ssh-keygen -s -O force-command=bas") def test_O_force_command(self, completion): assert completion assert not completion.startswith("force-command=") @@ -68,18 +72,28 @@ def test_O_unknown(self, completion): assert not completion - @pytest.mark.complete("ssh-keygen -O application=") + @pytest.mark.complete("ssh-keygen -t ed25519-sk -O application=") def test_O_application(self, completion): assert completion == "ssh:" - @pytest.mark.complete("ssh-keygen -O application=s") + @pytest.mark.complete("ssh-keygen -t ed25519-sk -O application=s") def test_O_application_s(self, completion): assert completion == "sh:" - @pytest.mark.complete("ssh-keygen -O application=ssh:") + @pytest.mark.complete("ssh-keygen -t ed25519-sk -O application=ssh:") def test_O_application_ssh_colon(self, completion): assert not completion - @pytest.mark.complete("ssh-keygen -O application=nonexistent") + @pytest.mark.complete( + "ssh-keygen -t ed25519-sk -O application=nonexistent" + ) def test_O_application_nonexistent(self, completion): assert not completion + + @pytest.mark.complete("ssh-keygen -r -O ") + def test_r_O(self, completion): + assert completion + + @pytest.mark.complete("ssh-keygen -Y -O ") + def test_Y_O(self, completion): + assert completion
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/unit/Makefile.am -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/unit/Makefile.am
Changed
@@ -2,7 +2,9 @@ test_unit_abspath.py \ test_unit_command_offset.py \ test_unit_compgen.py \ + test_unit_compgen_available_interfaces.py \ test_unit_compgen_commands.py \ + test_unit_compgen_split.py \ test_unit_count_args.py \ test_unit_delimited.py \ test_unit_deprecate_func.py \ @@ -18,6 +20,7 @@ test_unit_initialize.py \ test_unit_ip_addresses.py \ test_unit_known_hosts.py \ + test_unit_load.py \ test_unit_longopt.py \ test_unit_looks_like_path.py \ test_unit_parse_help.py \
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/unit/Makefile.in -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/unit/Makefile.in
Changed
@@ -200,7 +200,9 @@ test_unit_abspath.py \ test_unit_command_offset.py \ test_unit_compgen.py \ + test_unit_compgen_available_interfaces.py \ test_unit_compgen_commands.py \ + test_unit_compgen_split.py \ test_unit_count_args.py \ test_unit_delimited.py \ test_unit_deprecate_func.py \ @@ -216,6 +218,7 @@ test_unit_initialize.py \ test_unit_ip_addresses.py \ test_unit_known_hosts.py \ + test_unit_load.py \ test_unit_longopt.py \ test_unit_looks_like_path.py \ test_unit_parse_help.py \
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/unit/test_unit_compgen.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/unit/test_unit_compgen.py
Changed
@@ -1,7 +1,8 @@ -import pytest import re -from conftest import assert_bash_exec, bash_env_saved, assert_complete +import pytest + +from conftest import assert_bash_exec, assert_complete, bash_env_saved @pytest.mark.bashcomp(cmd=None)
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/unit/test_unit_compgen_available_interfaces.py
Added
@@ -0,0 +1,25 @@ +import pytest + +from conftest import assert_bash_exec + + +@pytest.mark.bashcomp(cmd=None) +class TestUtilCompgenAvailableInterfaces: + @pytest.fixture + def functions(self, bash): + assert_bash_exec( + bash, + "_comp__test_dump() { ((${#arr@})) && printf '<%s>' \"${arr@}\"; echo; }", + ) + assert_bash_exec( + bash, + '_comp__test_compgen() { local -a arr=(00); _comp_compgen -v arr "$@"; _comp__test_dump; }', + ) + + def test_1_trailing_colons(self, bash, functions): + output = assert_bash_exec( + bash, + "_comp__test_compgen available_interfaces", + want_output=True, + ) + assert ":>" not in output.strip()
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/unit/test_unit_compgen_split.py
Added
@@ -0,0 +1,102 @@ +import pytest + +from conftest import assert_bash_exec + + +@pytest.mark.bashcomp(cmd=None) +class TestUtilCompgenSplit: + @pytest.fixture + def functions(self, bash): + assert_bash_exec( + bash, + "_comp__test_dump() { ((${#arr@})) && printf '<%s>' \"${arr@}\"; echo; }", + ) + assert_bash_exec( + bash, + '_comp__test_compgen() { local -a arr=(00); _comp_compgen -v arr "$@"; _comp__test_dump; }', + ) + + assert_bash_exec( + bash, + "_comp__test_cmd1() { echo foo bar; echo baz; }", + ) + assert_bash_exec( + bash, + '_comp__test_attack() { echo "\\$(echo should_not_run >&2)"; }', + ) + + def test_1_basic(self, bash, functions): + output = assert_bash_exec( + bash, + '_comp__test_compgen split -- "$(_comp__test_cmd1)"', + want_output=True, + ) + assert output.strip() == "<foo><bar><baz>" + + def test_2_attack(self, bash, functions): + output = assert_bash_exec( + bash, + '_comp__test_compgen split -- "$(_comp__test_attack)"', + want_output=True, + ) + assert output.strip() == "<$(echo><should_not_run><>&2)>" + + def test_3_sep1(self, bash, functions): + output = assert_bash_exec( + bash, + '_comp__test_compgen split -l -- "$(_comp__test_cmd1)"', + want_output=True, + ) + assert output.strip() == "<foo bar><baz>" + + def test_3_sep2(self, bash, functions): + output = assert_bash_exec( + bash, + "_comp__test_compgen split -F $'b\\n' -- \"$(_comp__test_cmd1)\"", + want_output=True, + ) + assert output.strip() == "<foo ><ar><az>" + + def test_4_optionX(self, bash, functions): + output = assert_bash_exec( + bash, + '_comp__test_compgen split -X bar -- "$(_comp__test_cmd1)"', + want_output=True, + ) + assert output.strip() == "<foo><baz>" + + def test_4_optionS(self, bash, functions): + output = assert_bash_exec( + bash, + '_comp__test_compgen split -S .txt -- "$(_comp__test_cmd1)"', + want_output=True, + ) + assert output.strip() == "<foo.txt><bar.txt><baz.txt>" + + def test_4_optionP(self, bash, functions): + output = assert_bash_exec( + bash, + '_comp__test_compgen split -P /tmp/ -- "$(_comp__test_cmd1)"', + want_output=True, + ) + assert output.strip() == "</tmp/foo></tmp/bar></tmp/baz>" + + def test_4_optionPS(self, bash, functions): + output = assert_bash_exec( + bash, + '_comp__test_compgen split -P -S -- "$(_comp__test_cmd1)"', + want_output=True, + ) + assert output.strip() == "<foo><bar><baz>" + + def test_5_empty(self, bash, functions): + output = assert_bash_exec( + bash, '_comp__test_compgen split -- ""', want_output=True + ) + assert output.strip() == "" + + def test_5_empty2(self, bash, functions): + output = assert_bash_exec( + bash, '_comp__test_compgen split -- " "', want_output=True + ) + assert output.strip() == ""
View file
_service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/unit/test_unit_load.py
Added
@@ -0,0 +1,133 @@ +import os + +import pytest + +from conftest import assert_bash_exec, bash_env_saved, prepare_fixture_dir + + +@pytest.mark.bashcomp(cmd=None, cwd="_comp_load") +class TestCompLoad: + @pytest.fixture + def fixture_dir(self, request, bash): + """Construct the fixture directory in a temporary directory. + + Some of the tests use specific setups of symbolic links. However, if + we put the symbolic links in the static fixture directory, Automake + resolves them for tarballs. As a result, the tests fail when the files + are extracted from the tarballs. There does not seem to be any option + to change the behavior of Automake. + + We instead manually set up all symbolic links needed for the tests + here. The other normal files and directories are statically included + in the repository as "/test/fixtures/_comp_load". We first copy the + statically included files and directories to a temporary directory and + set up symbolic links. + """ + + tmpdir, _, _ = prepare_fixture_dir(request, files=, dirs=) + assert_bash_exec(bash, "cp -R %s/* %s/" % (os.getcwd(), tmpdir)) + assert_bash_exec(bash, "mkdir -p %s/bin" % tmpdir) + assert_bash_exec( + bash, "ln -sf ../prefix1/bin/cmd1 %s/bin/cmd1" % tmpdir + ) + assert_bash_exec( + bash, "ln -sf ../prefix1/sbin/cmd2 %s/bin/cmd2" % tmpdir + ) + return str(tmpdir) + + def test_userdir_1(self, bash, fixture_dir): + with bash_env_saved(bash) as bash_env: + bash_env.chdir(fixture_dir) + bash_env.write_variable( + "BASH_COMPLETION_USER_DIR", + "$PWD/userdir1:$PWD/userdir2:$BASH_COMPLETION_USER_DIR", + quote=False, + ) + bash_env.write_variable( + "PATH", "$PWD/prefix1/bin:$PWD/prefix1/sbin", quote=False + ) + output = assert_bash_exec( + bash, "_comp_load cmd1", want_output=True + ) + assert output.strip() == "cmd1: sourced from userdir1" + output = assert_bash_exec( + bash, "_comp_load cmd2", want_output=True + ) + assert output.strip() == "cmd2: sourced from userdir2" + + def test_PATH_1(self, bash, fixture_dir): + with bash_env_saved(bash) as bash_env: + bash_env.chdir(fixture_dir) + bash_env.write_variable( + "PATH", "$PWD/prefix1/bin:$PWD/prefix1/sbin", quote=False + ) + output = assert_bash_exec( + bash, "_comp_load cmd1", want_output=True + ) + assert output.strip() == "cmd1: sourced from prefix1" + output = assert_bash_exec( + bash, "_comp_load cmd2", want_output=True + ) + assert output.strip() == "cmd2: sourced from prefix1" + output = assert_bash_exec( + bash, "complete -p cmd2", want_output=True + ) + assert " cmd2" in output + output = assert_bash_exec( + bash, 'complete -p "$PWD/prefix1/sbin/cmd2"', want_output=True + ) + assert "/prefix1/sbin/cmd2" in output + + def test_cmd_path_1(self, bash, fixture_dir): + with bash_env_saved(bash) as bash_env: + bash_env.chdir(fixture_dir) + assert_bash_exec(bash, "complete -r cmd1 || :", want_output=None) + output = assert_bash_exec( + bash, "_comp_load prefix1/bin/cmd1", want_output=True + ) + assert output.strip() == "cmd1: sourced from prefix1" + output = assert_bash_exec( + bash, 'complete -p "$PWD/prefix1/bin/cmd1"', want_output=True + ) + assert "/prefix1/bin/cmd1" in output + assert_bash_exec(bash, "! complete -p cmd1", want_output=None) + output = assert_bash_exec( + bash, "_comp_load prefix1/sbin/cmd2", want_output=True + ) + assert output.strip() == "cmd2: sourced from prefix1" + output = assert_bash_exec( + bash, "_comp_load bin/cmd1", want_output=True + ) + assert output.strip() == "cmd1: sourced from prefix1" + output = assert_bash_exec( + bash, "_comp_load bin/cmd2", want_output=True + ) + assert output.strip() == "cmd2: sourced from prefix1" + + def test_cmd_path_2(self, bash, fixture_dir): + with bash_env_saved(bash) as bash_env: + bash_env.chdir(fixture_dir) + bash_env.write_variable("PATH", "$PWD/bin:$PATH", quote=False) + output = assert_bash_exec( + bash, "_comp_load cmd1", want_output=True + ) + assert output.strip() == "cmd1: sourced from prefix1" + output = assert_bash_exec( + bash, "_comp_load cmd2", want_output=True + ) + assert output.strip() == "cmd2: sourced from prefix1" + + def test_cmd_intree_precedence(self, bash, fixture_dir): + """ + Test in-tree, i.e. completions/$cmd relative to the main script + has precedence over location derived from PATH. + """ + with bash_env_saved(bash) as bash_env: + bash_env.chdir(fixture_dir) + bash_env.write_variable("PATH", "$PWD/prefix1/bin", quote=False) + # The in-tree `sh` completion should be loaded here, + # and cause no output, unlike our `$PWD/prefix1/bin/sh` canary. + assert_bash_exec(bash, "_comp_load sh", want_output=False) + + def test_option_like_cmd_name(self, bash): + assert_bash_exec(bash, "! _comp_load -- --non-existent")
View file
_service:tar_scm:bash-completion-2.12.0.tar.xz/test/t/unit/test_unit_realcommand.py -> _service:tar_scm:bash-completion-2.14.0.tar.xz/test/t/unit/test_unit_realcommand.py
Changed
@@ -88,3 +88,11 @@ want_output=False, ) assert output.strip() == "" + + def test_option_like_cmd_name(self, bash, functions): + output = assert_bash_exec( + bash, + "! __tester --non-existent", + want_output=False, + ) + assert output.strip() == ""
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.
浙ICP备2022010568号-2