[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1053860: /usr/share/bash-completion/completions/ethtool: completes with ^[[36m at the start



Control: reassign -1 bash-completion 1:2.11-8
Control: close -1 1:2.14.0-1

On Sat, Aug 10, 2024 at 01:52:31PM +0200, Salvatore Bonaccorso wrote:
> JFTR, I cannot reproduce this behaviour right now.

I can (bash 5.2.21-2.1, TERM=st-256color and TERM=dumb),
no ethtool-related aliases.

/usr/share/bash-completion/completions/ethtool uses
_available_interfaces(),
/usr/share/bash-completion/bash_completion 
which runs
    COMPREPLY=($({
    # ...
      ifconfig -a || ip link show
    # ...
    } 2>/dev/null | awk \
	        '/^[^ \t]/ { if ($1 ~ /^[0-9]+:/) { print $2 } else { print $1 } }'))
and thus
  $ ip link show | cat -A
  1: ^[[36mlo: ^[[0m<LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000$
      link/loopback ^[[33m00:00:00:00:00:00^[[0m brd ^[[33m00:00:00:00:00:00^[[0m$
  2: ^[[36mcard1: ^[[0m<BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9000 qdisc mq master bond1 state ^[[32mUP ^[[0mmode DEFAULT group default qlen 1000$
      link/ether ^[[33m00:0a:f7:63:d5:12^[[0m brd ^[[33mff:ff:ff:ff:ff:ff^[[0m permaddr ^[[33m00:0a:f7:63:d5:10^[[0m$
because I have alias ip='ip -c'.

This means this is bash-completion bug,
and after updating to 1:2.14.0-1 from 1:2.11-8 this no longer happens.
Can't find a specific debbug to merge with or a specific changelog line
ofr this, so reassigning and closing at this granularity.

Best,

Attachment: signature.asc
Description: PGP signature


Reply to: