Closed scop closed 6 months ago
Ah, this change is the problem:
I don't remember why I did this change. I possibly tried to handle it in the awk
script and removed %[[:punct:]]
, but I later gave up handling it in the awk
script forgetting to restore %[[:punct:]]
.
Note that this also breaks interfaces that look like this veth0@veth1, _comp_compgen_available_interfaces returns the entire thing when it should only return veth0
Thank you for the information. I'd like to confirm. Do you mean "veth0@
or veth1@
"? Or is it actually veth0@veth1
? I don't think the latter was broken by the change because veth0@veth1
cannot be modified to veth0
by "${generated[@]/%[[:punct:]]/}"
, i.e. it was broken from the beginning if you mean veth0@veth1
.
Thank you for the information. I'd like to confirm. Do you mean "
veth0@
orveth1@
"? Or is it actuallyveth0@veth1
? I don't think the latter was broken by the change becauseveth0@veth1
cannot be modified toveth0
by"${generated[@]/%[[:punct:]]/}"
, i.e. it was broken from the beginning if you meanveth0@veth1
.
I mean the latter veth0@veth1
, I guess it was broken even before this change
Thanks! So, something like "${generated[@]%%[[:punct:]]*}"
might be better.
Oops, I somehow failed to follow the discussion here. It's likely things were broken also before this changes, but let's continue the discussion about the correct behavior in https://github.com/scop/bash-completion/issues/1133.
Describe the bug
SSIA.
To reproduce
Expected behavior
Available interfaces shown with no trailing colon.
Versions (please complete the following information)
echo "$BASH_VERSION"
: 5.1.16(1)-release(IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}")
: current masterAdditional context
Regression in b60353508eb470515f1063a1e1a75bdf1fda730f
Debug trace