bash-completion icon indicating copy to clipboard operation
bash-completion copied to clipboard

Missing wildcard support

Open bitstreamout opened this issue 8 years ago • 2 comments

given e.g. a directory with

graphviz-gvedit.spec graphviz-plugins.spec graphviz-smyrna.spec graphviz.spec

ls *spec<TAB><TAB>

does not work. That is that _longopt does not support wild cards nor the completion options are used to do that if _longopt does not return anything.

bitstreamout avatar May 13 '16 14:05 bitstreamout

Compare with pull request https://github.com/scop/bash-completion/pull/41

bitstreamout avatar May 13 '16 14:05 bitstreamout

A post at superuser.com echoes bitstreamout's observation that compgen/compopt -o bashdefault is useful.

This reproduces in a minimal debootstrap environment for Debian 11, where ls /*<TAB> fails to show completions after . /usr/share/bash-completion/bash_completion is run, and in a full install can be seen from login until a shopt -u progcomp/complete -r/suitable edit to ~/.bashrc

debian's bash-completion 1:2.11-2 patches as suggested for this test case with:

--- bash_completion.orig        2021-11-07 10:26:31.218296781 +0000
+++ bash_completion     2021-11-07 10:26:50.422391751 +0000
@@ -623,6 +623,8 @@
         # 2>/dev/null for direct invocation, e.g. in the _filedir unit test
         compopt -o filenames 2>/dev/null
         COMPREPLY+=("${toks[@]}")
+    else
+        compopt -o bashdefault 2>/dev/null
     fi
 } # _filedir()

WilliamTowle avatar Nov 07 '21 11:11 WilliamTowle