From 5ba91d12bba8caa5e7aa975f71f0a02d9b511f2b Mon Sep 17 00:00:00 2001 From: Platon Pronko Date: Thu, 30 Mar 2023 18:15:22 +0800 Subject: [PATCH 1/4] fix(_comp_delimited): prepend prefix to all compreply args Fixes #552. Previously prefix was only prepended if COMPREPLY only contained one argument - this commit fixes it so prefix is prepended to all arguments. --- bash_completion | 3 ++- test/t/test_pgrep.py | 1 - test/t/test_ssh_keygen.py | 2 -- test/t/test_tox.py | 2 +- test/t/test_tshark.py | 2 +- test/t/unit/Makefile.am | 1 + test/t/unit/test_unit_delimited.py | 42 ++++++++++++++++++++++++++++++ 7 files changed, 47 insertions(+), 6 deletions(-) create mode 100644 test/t/unit/test_unit_delimited.py diff --git a/bash_completion b/bash_completion index df8c181f59f..655b3cd0963 100644 --- a/bash_completion +++ b/bash_completion @@ -827,7 +827,8 @@ _comp_delimited() COMPREPLY=($(compgen "$@" -- "${cur##*"$delimiter"}")) fi - ((${#COMPREPLY[@]} == 1)) && COMPREPLY=(${COMPREPLY/#/$prefix}) + ((${#COMPREPLY[@]})) && COMPREPLY=("${COMPREPLY[@]/#/"$prefix"}") + [[ $delimiter != : ]] || __ltrim_colon_completions "$cur" } diff --git a/test/t/test_pgrep.py b/test/t/test_pgrep.py index a319f60b55b..db3dfdd7b98 100644 --- a/test/t/test_pgrep.py +++ b/test/t/test_pgrep.py @@ -31,4 +31,3 @@ def test_nslist(self, completion): ) def test_nslist_after_comma(self, completion): assert completion - assert not any("," in x for x in completion) diff --git a/test/t/test_ssh_keygen.py b/test/t/test_ssh_keygen.py index 5c8adabba3a..cc6ff4ed028 100644 --- a/test/t/test_ssh_keygen.py +++ b/test/t/test_ssh_keygen.py @@ -27,13 +27,11 @@ def test_filedir_pub_at_end_of_s(self, completion): @pytest.mark.complete("ssh-keygen -s foo_key -n foo,") def test_usernames_for_n(self, completion): assert completion - assert not any("," in x for x in completion) # TODO check that these are usernames @pytest.mark.complete("ssh-keygen -s foo_key -h -n foo,") def test_host_for_h_n(self, completion): assert completion - assert not any("," in x for x in completion) # TODO check that these are hostnames @pytest.mark.complete("ssh-keygen -Y foo -n ") diff --git a/test/t/test_tox.py b/test/t/test_tox.py index 31ed4b04b23..b101b9be714 100644 --- a/test/t/test_tox.py +++ b/test/t/test_tox.py @@ -12,7 +12,7 @@ def test_2(self, completion): @pytest.mark.complete("tox -e foo,", cwd="tox") def test_3(self, completion): - assert all(x in completion for x in "py37 ALL".split()) + assert all("foo," + x in completion for x in "py37 ALL".split()) @pytest.mark.complete("tox -e foo -- ", cwd="tox") def test_default_after_dashdash(self, completion): diff --git a/test/t/test_tshark.py b/test/t/test_tshark.py index b28651f8a91..d44e62d48c7 100644 --- a/test/t/test_tshark.py +++ b/test/t/test_tshark.py @@ -14,7 +14,7 @@ def test_2(self, completion): @pytest.mark.complete("tshark -O foo,htt", require_cmd=True) def test_3(self, completion): # p: one completion only; http: e.g. http and http2 - assert completion == "p" or "http" in completion + assert completion == "p" or "foo,http" in completion @pytest.mark.complete("tshark -o tcp", require_cmd=True) def test_4(self, completion): diff --git a/test/t/unit/Makefile.am b/test/t/unit/Makefile.am index c0928110e49..f1ef8b5bce1 100644 --- a/test/t/unit/Makefile.am +++ b/test/t/unit/Makefile.am @@ -1,6 +1,7 @@ EXTRA_DIST = \ test_unit_command_offset.py \ test_unit_count_args.py \ + test_unit_delimited.py \ test_unit_deprecate_func.py \ test_unit_dequote.py \ test_unit_expand.py \ diff --git a/test/t/unit/test_unit_delimited.py b/test/t/unit/test_unit_delimited.py new file mode 100644 index 00000000000..e20dcd18967 --- /dev/null +++ b/test/t/unit/test_unit_delimited.py @@ -0,0 +1,42 @@ +import pytest + +from conftest import assert_bash_exec + + +@pytest.mark.bashcomp(cmd=None) +class TestUnitDelimited: + @pytest.fixture(scope="class") + def functions(self, request, bash): + assert_bash_exec( + bash, + "_comp_cmd_test_delim() {" + " local cur prev words cword comp_args;" + " _comp_get_words cur;" + " _comp_delimited , -W 'alpha beta bravo';" + "};" + "complete -F _comp_cmd_test_delim test_delim", + ) + + @pytest.mark.complete("test_delim --opt=a") + def test_1(self, functions, completion): + assert completion == ["lpha"] + + @pytest.mark.complete("test_delim --opt=b") + def test_2(self, functions, completion): + assert completion == ["beta", "bravo"] + + @pytest.mark.complete("test_delim --opt=alpha,b") + def test_3(self, functions, completion): + assert completion == ["alpha,beta", "alpha,bravo"] + + @pytest.mark.complete("test_delim --opt=alpha,be") + def test_4(self, functions, completion): + assert completion == ["ta"] + + @pytest.mark.complete("test_delim --opt=beta,a") + def test_5(self, functions, completion): + assert completion == ["lpha"] + + @pytest.mark.complete("test_delim --opt=c") + def test_6(self, functions, completion): + assert not completion From 8477d26b63099ad85bd7d977089999457c077cd0 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sat, 8 Apr 2023 21:26:32 +0900 Subject: [PATCH 2/4] test: reduce tests --- test/t/Makefile.am | 692 +--------------------------------------- test/t/unit/Makefile.am | 31 +- 2 files changed, 2 insertions(+), 721 deletions(-) diff --git a/test/t/Makefile.am b/test/t/Makefile.am index 461448e3790..8249aa040c0 100644 --- a/test/t/Makefile.am +++ b/test/t/Makefile.am @@ -2,706 +2,16 @@ SUBDIRS = unit EXTRA_DIST = \ conftest.py \ - test_2to3.py \ - test_7z.py \ - test_a2ps.py \ - test_a2x.py \ - test_abook.py \ - test_aclocal.py \ - test_acpi.py \ - test_acroread.py \ - test_adb.py \ - test_add_members.py \ - test_alias.py \ - test_alpine.py \ - test_animate.py \ - test_ant.py \ - test_apache2ctl.py \ - test_appdata_validate.py \ - test_apt_build.py \ - test_apt_cache.py \ - test_apt_get.py \ - test_apt_mark.py \ - test_aptitude.py \ - test_arch.py \ - test_arp.py \ - test_arping.py \ - test_arpspoof.py \ - test_asciidoc.py \ - test_aspell.py \ - test_autoconf.py \ - test_autoheader.py \ - test_automake.py \ - test_autoreconf.py \ - test_autorpm.py \ - test_autoscan.py \ - test_autossh.py \ - test_autoupdate.py \ - test_avahi_browse.py \ - test_avctrl.py \ - test_awk.py \ - test_badblocks.py \ - test_base64.py \ - test_bash.py \ - test_bc.py \ - test_bind.py \ - test_bison.py \ - test_bk.py \ - test_bmake.py \ - test_brctl.py \ - test_bsdtar.py \ - test_btdownloadcurses_py.py \ - test_btdownloadgui_py.py \ - test_btdownloadheadless_py.py \ - test_bts.py \ - test_bzip2.py \ - test_cal.py \ - test_cancel.py \ - test_cardctl.py \ - test_carton.py \ - test_cat.py \ - test_cc.py \ - test_ccache.py \ - test_ccze.py \ - test_cd.py \ - test_cdrecord.py \ - test_cfagent.py \ - test_cfrun.py \ - test_chage.py \ - test_change_pw.py \ - test_check_db.py \ - test_check_perms.py \ - test_checksec.py \ - test_chfn.py \ - test_chgrp.py \ - test_chkconfig.py \ - test_chmod.py \ - test_chown.py \ - test_chpasswd.py \ - test_chromium_browser.py \ - test_chronyc.py \ - test_chroot.py \ - test_chrpath.py \ - test_chsh.py \ - test_ci.py \ - test_ciptool.py \ - test_civclient.py \ - test_civserver.py \ - test_cksfv.py \ - test_cleanarch.py \ - test_clisp.py \ - test_clone_member.py \ - test_co.py \ - test_colordiff.py \ - test_compare.py \ - test_compgen.py \ - test_complete.py \ - test_composite.py \ - test_config_list.py \ - test_configure.py \ - test_conjure.py \ - test_convert.py \ - test_cowsay.py \ - test_cp.py \ - test_cpan2dist.py \ - test_cpio.py \ - test_cplusplus.py \ - test_cppcheck.py \ - test_createdb.py \ - test_createuser.py \ - test_crontab.py \ - test_cryptsetup.py \ - test_csplit.py \ - test_curl.py \ - test_cut.py \ - test_cvs.py \ - test_cvsps.py \ - test_date.py \ - test_dcop.py \ - test_dd.py \ - test_declare.py \ - test_deja_dup.py \ - test_desktop_file_validate.py \ - test_df.py \ - test_dfutool.py \ - test_dhclient.py \ - test_dict.py \ - test_diff.py \ - test_dir.py \ - test_display.py \ - test_dmesg.py \ - test_dmypy.py \ - test_dnssec_keygen.py \ - test_dnsspoof.py \ - test_dot.py \ - test_dpkg.py \ - test_dpkg_deb.py \ - test_dpkg_query.py \ - test_dpkg_reconfigure.py \ - test_dpkg_source.py \ - test_dropdb.py \ - test_dropuser.py \ - test_dselect.py \ - test_dsniff.py \ - test_du.py \ - test_dumpdb.py \ - test_dumpe2fs.py \ - test_e2freefrag.py \ - test_e2label.py \ - test_ebtables.py \ - test_ecryptfs_migrate_home.py \ - test_eject.py \ - test_enscript.py \ - test_env.py \ - test_eog.py \ - test_ether_wake.py \ - test_etherwake.py \ - test_evince.py \ - test_expand.py \ - test_explodepkg.py \ - test_export.py \ - test_faillog.py \ - test_fbgs.py \ - test_fbi.py \ - test_feh.py \ - test_file.py \ - test_file_roller.py \ - test_filefrag.py \ - test_filesnarf.py \ - test_find.py \ - test_find_member.py \ - test_finger.py \ test_fio.py \ - test_firefox.py \ - test_flake8.py \ - test_fmt.py \ - test_fold.py \ - test_freebsd_update.py \ - test_freeciv.py \ - test_freeciv_server.py \ - test_function.py \ - test_fusermount.py \ - test_g4.py \ - test_g77.py \ - test_gcc.py \ - test_gcj.py \ - test_gcl.py \ - test_gdb.py \ - test_genaliases.py \ - test_gendiff.py \ - test_genisoimage.py \ - test_geoiplookup.py \ - test_getconf.py \ - test_getent.py \ - test_gkrellm.py \ - test_gm.py \ - test_gmplayer.py \ - test_gnatmake.py \ - test_gnokii.py \ - test_gnome_mplayer.py \ - test_gnome_screenshot.py \ - test_gpasswd.py \ - test_gpc.py \ - test_gperf.py \ - test_gpg.py \ - test_gpg2.py \ - test_gpgv.py \ - test_gphoto2.py \ - test_gplusplus.py \ - test_gprof.py \ - test_grep.py \ - test_groupadd.py \ - test_groupdel.py \ - test_groupmems.py \ - test_groupmod.py \ - test_growisofs.py \ - test_grpck.py \ - test_grub.py \ - test_gssdp_device_sniffer.py \ - test_gssdp_discover.py \ - test_gzip.py \ - test_hciattach.py \ - test_hciconfig.py \ - test_hcitool.py \ - test_hddtemp.py \ - test_head.py \ - test_help.py \ - test_hexdump.py \ - test_hid2hci.py \ - test_host.py \ - test_hostname.py \ - test_hping2.py \ - test_hping3.py \ - test_htop.py \ - test_htpasswd.py \ - test_hunspell.py \ - test_hwclock.py \ - test_iconv.py \ - test_id.py \ - test_identify.py \ - test_idn.py \ - test_ifdown.py \ - test_ifstat.py \ - test_iftop.py \ - test_ifup.py \ - test_import.py \ - test_influx.py \ - test_info.py \ - test_inject.py \ - test_inotifywait.py \ - test_inotifywatch.py \ - test_insmod.py \ - test_installpkg.py \ - test_interdiff.py \ - test_invoke_rc_d.py \ - test_ionice.py \ - test_ip.py \ - test_ipcalc.py \ - test_iperf.py \ - test_iperf3.py \ - test_ipmitool.py \ - test_ipsec.py \ - test_iptables.py \ - test_ipv6calc.py \ - test_irb.py \ - test_iscsiadm.py \ - test_isort.py \ - test_isql.py \ - test_iwconfig.py \ - test_iwlist.py \ - test_iwpriv.py \ - test_iwspy.py \ - test_jar.py \ - test_jarsigner.py \ - test_java.py \ - test_javac.py \ - test_javadoc.py \ - test_javaws.py \ - test_jpegoptim.py \ - test_jps.py \ - test_jq.py \ - test_jshint.py \ - test_json_xs.py \ - test_jsonschema.py \ - test_k3b.py \ - test_kcov.py \ - test_kdvi.py \ - test_kill.py \ - test_killall.py \ - test_kldload.py \ - test_kldunload.py \ - test_koji.py \ - test_kpdf.py \ - test_kplayer.py \ - test_ktutil.py \ - test_l2ping.py \ - test_larch.py \ - test_lastlog.py \ - test_ld.py \ - test_ldapadd.py \ - test_ldapcompare.py \ - test_ldapdelete.py \ - test_ldapmodrdn.py \ - test_ldappasswd.py \ - test_ldapsearch.py \ - test_ldapvi.py \ - test_ldapwhoami.py \ - test_ldd.py \ - test_less.py \ - test_lftp.py \ - test_lftpget.py \ - test_lilo.py \ - test_links.py \ - test_lintian.py \ - test_lintian_info.py \ - test_lisp.py \ - test_list_admins.py \ - test_list_lists.py \ - test_list_members.py \ - test_list_owners.py \ - test_ln.py \ - test_locale_gen.py \ - test_look.py \ - test_lpq.py \ - test_lpr.py \ - test_lrzip.py \ - test_ls.py \ - test_lsof.py \ - test_lspci.py \ - test_lsscsi.py \ - test_lsusb.py \ - test_lua.py \ - test_luac.py \ - test_luseradd.py \ - test_luserdel.py \ - test_lusermod.py \ - test_lvchange.py \ - test_lvcreate.py \ - test_lvdisplay.py \ - test_lvextend.py \ - test_lvm.py \ - test_lvmdiskscan.py \ - test_lvreduce.py \ - test_lvremove.py \ - test_lvrename.py \ - test_lvresize.py \ - test_lvs.py \ - test_lvscan.py \ - test_lz4.py \ - test_lzip.py \ - test_lzma.py \ - test_lzop.py \ - test_m4.py \ - test_macof.py \ - test_mailmanctl.py \ - test_mailsnarf.py \ - test_make.py \ - test_makepkg.py \ test_man.py \ - test_mc.py \ - test_mcrypt.py \ - test_md5sum.py \ - test_mdadm.py \ - test_mdecrypt.py \ - test_mdtool.py \ - test_medusa.py \ - test_mencoder.py \ - test_mii_diag.py \ - test_mii_tool.py \ - test_minicom.py \ - test_mkdir.py \ - test_mkfifo.py \ - test_mkinitrd.py \ - test_mkisofs.py \ - test_mknod.py \ - test_mktemp.py \ - test_mmsitepass.py \ - test_mock.py \ - test_modinfo.py \ - test_modprobe.py \ - test_module.py \ - test_mogrify.py \ - test_monodevelop.py \ - test_montage.py \ - test_mount.py \ - test_mplayer.py \ - test_mr.py \ - test_msgsnarf.py \ - test_msynctool.py \ - test_mtx.py \ - test_munin_node_configure.py \ - test_munin_run.py \ - test_munindoc.py \ - test_mussh.py \ - test_mutt.py \ - test_muttng.py \ - test_mv.py \ - test_mypy.py \ - test_mysql.py \ - test_mysqladmin.py \ - test_nc.py \ - test_ncftp.py \ - test_neomutt.py \ - test_nethogs.py \ - test_netstat.py \ - test_newgrp.py \ - test_newlist.py \ - test_newusers.py \ - test_ngrep.py \ - test_nl.py \ - test_nm.py \ - test_nmap.py \ - test_nmcli.py \ - test_nproc.py \ - test_nslookup.py \ - test_nsupdate.py \ - test_ntpdate.py \ - test_objcopy.py \ - test_objdump.py \ - test_od.py \ - test_oggdec.py \ - test_openssl.py \ - test_opera.py \ - test_optipng.py \ - test_p4.py \ - test_pack200.py \ - test_passwd.py \ - test_paste.py \ - test_patch.py \ - test_pdftoppm.py \ - test_pdftotext.py \ - test_perl.py \ - test_perlcritic.py \ - test_perldoc.py \ - test_perltidy.py \ test_pgrep.py \ - test_phing.py \ - test_pidof.py \ - test_pine.py \ - test_pinfo.py \ - test_ping.py \ - test_pkg_config.py \ - test_pkg_deinstall.py \ - test_pkg_delete.py \ - test_pkg_get.py \ - test_pkg_info.py \ - test_pkgadd.py \ - test_pkgconf.py \ - test_pkgrm.py \ - test_pkgtool.py \ - test_pkgutil.py \ - test_pkill.py \ - test_plague_client.py \ - test_pm_hibernate.py \ - test_pm_is_supported.py \ - test_pm_powersave.py \ - test_pngfix.py \ - test_portinstall.py \ - test_portsnap.py \ - test_portupgrade.py \ - test_postcat.py \ - test_postconf.py \ - test_postfix.py \ - test_postmap.py \ - test_postsuper.py \ - test_povray.py \ - test_pr.py \ - test_prelink.py \ - test_printenv.py \ - test_protoc.py \ test_ps.py \ - test_psql.py \ - test_ptx.py \ - test_puppet.py \ - test_pushd.py \ - test_pv.py \ - test_pvchange.py \ - test_pvcreate.py \ - test_pvdisplay.py \ - test_pvmove.py \ - test_pvremove.py \ - test_pvs.py \ - test_pvscan.py \ - test_pwck.py \ - test_pwd.py \ - test_pwdx.py \ - test_pwgen.py \ - test_pycodestyle.py \ - test_pydoc.py \ - test_pydocstyle.py \ - test_pyflakes.py \ test_pylint.py \ - test_pylint_3.py \ - test_pyston.py \ - test_pytest.py \ - test_python.py \ - test_python3.py \ - test_pyvenv.py \ - test_qemu.py \ - test_qemu_system_x86_64.py \ - test_qrunner.py \ - test_querybts.py \ - test_quota.py \ - test_quotacheck.py \ - test_quotaon.py \ - test_radvdump.py \ - test_rcs.py \ - test_rcsdiff.py \ - test_rdesktop.py \ - test_rdict.py \ - test_readelf.py \ - test_readonly.py \ - test_remove_members.py \ - test_removepkg.py \ - test_renice.py \ - test_repomanage.py \ - test_reportbug.py \ - test_reptyr.py \ - test_resolvconf.py \ - test_rfcomm.py \ - test_rfkill.py \ - test_ri.py \ - test_rlog.py \ - test_rm.py \ - test_rmdir.py \ - test_rmlist.py \ - test_rmmod.py \ - test_route.py \ - test_rpcdebug.py \ - test_rpm.py \ - test_rpm2tgz.py \ - test_rpmbuild.py \ - test_rrdtool.py \ - test_rsync.py \ - test_rtcwake.py \ - test_runuser.py \ - test_sbcl.py \ - test_sbcl_mt.py \ - test_sbopkg.py \ - test_scp.py \ - test_screen.py \ - test_scrub.py \ - test_sdptool.py \ - test_secret_tool.py \ - test_sed.py \ - test_seq.py \ - test_service.py \ - test_set.py \ - test_setquota.py \ - test_sftp.py \ - test_sh.py \ - test_sha1sum.py \ - test_sha256sum.py \ - test_shar.py \ - test_shellcheck.py \ - test_sitecopy.py \ - test_slackpkg.py \ - test_slapt_get.py \ - test_slapt_src.py \ - test_smartctl.py \ - test_smbcacls.py \ - test_smbclient.py \ - test_smbcquotas.py \ - test_smbget.py \ - test_smbpasswd.py \ - test_smbtar.py \ - test_smbtree.py \ - test_snownews.py \ - test_sort.py \ - test_split.py \ - test_spovray.py \ - test_sqlite3.py \ test_ss.py \ - test_ssh.py \ - test_ssh_add.py \ - test_ssh_copy_id.py \ test_ssh_keygen.py \ test_ssh_keyscan.py \ - test_sshfs.py \ - test_sshmitm.py \ - test_sshow.py \ - test_strace.py \ - test_stream.py \ - test_strings.py \ - test_strip.py \ - test_su.py \ - test_sudo.py \ - test_sum.py \ - test_svcadm.py \ - test_svk.py \ - test_svn.py \ - test_svnadmin.py \ - test_svnlook.py \ - test_sync_members.py \ - test_synclient.py \ - test_sysbench.py \ - test_sysctl.py \ - test_tac.py \ - test_tail.py \ - test_tar.py \ - test_tcpdump.py \ - test_tcpkill.py \ - test_tcpnice.py \ - test_tee.py \ - test_texindex.py \ - test_tightvncviewer.py \ - test_time.py \ - test_timeout.py \ - test_tipc.py \ - test_totem.py \ - test_touch.py \ test_tox.py \ - test_tr.py \ - test_tracepath.py \ - test_tree.py \ - test_truncate.py \ - test_tshark.py \ - test_tsig_keygen.py \ - test_tune2fs.py \ - test_udevadm.py \ - test_ulimit.py \ - test_umount.py \ - test_unace.py \ - test_uname.py \ - test_unexpand.py \ - test_uniq.py \ - test_units.py \ - test_unpack200.py \ - test_unrar.py \ - test_unset.py \ - test_unshunt.py \ - test_update_alternatives.py \ - test_update_rc_d.py \ - test_upgradepkg.py \ - test_urlsnarf.py \ - test_uscan.py \ - test_useradd.py \ - test_userdel.py \ - test_usermod.py \ - test_valgrind.py \ - test_vdir.py \ - test_vgcfgbackup.py \ - test_vgcfgrestore.py \ - test_vgchange.py \ - test_vgck.py \ - test_vgconvert.py \ - test_vgcreate.py \ - test_vgdisplay.py \ - test_vgexport.py \ - test_vgextend.py \ - test_vgimport.py \ - test_vgmerge.py \ - test_vgmknodes.py \ - test_vgreduce.py \ - test_vgremove.py \ - test_vgrename.py \ - test_vgs.py \ - test_vgscan.py \ - test_vgsplit.py \ - test_vi.py \ - test_vipw.py \ - test_vmstat.py \ - test_vncviewer.py \ - test_vpnc.py \ - test_watch.py \ - test_wc.py \ - test_webmitm.py \ - test_wget.py \ - test_who.py \ - test_wine.py \ - test_withlist.py \ - test_wodim.py \ - test_wol.py \ - test_write.py \ - test_wsimport.py \ - test_wtf.py \ - test_wvdial.py \ - test_xdg_mime.py \ - test_xdg_settings.py \ - test_xev.py \ - test_xfreerdp.py \ - test_xgamma.py \ - test_xhost.py \ - test_xm.py \ - test_xmllint.py \ - test_xmlwf.py \ - test_xmms.py \ - test_xmodmap.py \ - test_xpovray.py \ - test_xrandr.py \ - test_xrdb.py \ - test_xsltproc.py \ - test_xvfb_run.py \ - test_xvnc4viewer.py \ - test_xxd.py \ - test_xz.py \ - test_xzdec.py \ - test_ypcat.py \ - test_ypmatch.py \ - test_yum.py \ - test_yum_arch.py \ - test_zopfli.py \ - test_zopflipng.py + test_tshark.py all: diff --git a/test/t/unit/Makefile.am b/test/t/unit/Makefile.am index f1ef8b5bce1..eb1d96925bb 100644 --- a/test/t/unit/Makefile.am +++ b/test/t/unit/Makefile.am @@ -1,34 +1,5 @@ EXTRA_DIST = \ - test_unit_command_offset.py \ - test_unit_count_args.py \ - test_unit_delimited.py \ - test_unit_deprecate_func.py \ - test_unit_dequote.py \ - test_unit_expand.py \ - test_unit_expand_glob.py \ - test_unit_expand_tilde_by_ref.py \ - test_unit_filedir.py \ - test_unit_find_unique_completion_pair.py \ - test_unit_get_words.py \ - test_unit_get_cword.py \ - test_unit_initialize.py \ - test_unit_ip_addresses.py \ - test_unit_known_hosts_real.py \ - test_unit_longopt.py \ - test_unit_looks_like_path.py \ - test_unit_parse_help.py \ - test_unit_parse_usage.py \ - test_unit_pgids.py \ - test_unit_pids.py \ - test_unit_pnames.py \ - test_unit_quote.py \ - test_unit_quote_compgen.py \ - test_unit_split.py \ - test_unit_tilde.py \ - test_unit_unlocal.py \ - test_unit_variables.py \ - test_unit_xfunc.py \ - test_unit_xinetd_services.py + test_unit_delimited.py all: From 36a2e8725230bc0db3192a557e941b6cd40f4d4b Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sat, 8 Apr 2023 21:28:56 +0900 Subject: [PATCH 3/4] test: reduce dist --- .github/workflows/ci.yaml | 7 ------- 1 file changed, 7 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 306b45508a4..598d98217c7 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -42,14 +42,7 @@ jobs: strategy: matrix: include: - - dist: alpine - dist: centos7 - - dist: debian10 - - dist: debian10 - bsd: true - network: none - - dist: fedoradev - - dist: ubuntu14 steps: - uses: actions/checkout@v3 - uses: GoogleCloudPlatform/release-please-action@v3 From 2d5ebb00640cea9f007f3d7a1e313c638f662f60 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sat, 8 Apr 2023 21:37:35 +0900 Subject: [PATCH 4/4] fix(_comp_delimited): work around bash-4.2 quoting --- bash_completion | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index 655b3cd0963..4834a7acbb9 100644 --- a/bash_completion +++ b/bash_completion @@ -827,7 +827,10 @@ _comp_delimited() COMPREPLY=($(compgen "$@" -- "${cur##*"$delimiter"}")) fi - ((${#COMPREPLY[@]})) && COMPREPLY=("${COMPREPLY[@]/#/"$prefix"}") + local i + for i in "${!COMPREPLY[@]}"; do + COMPREPLY[i]=${COMPREPLY[i]/#/"$prefix"} + done [[ $delimiter != : ]] || __ltrim_colon_completions "$cur" }