Open hellodword opened 10 months ago
BTW, which packages provide ip
and ifconfig
on your system? I get different outputs on my system, the outputs span multiple lines
BTW, which packages provide
ip
andifconfig
on your system? I get different outputs on my system, the outputs span multiple lines
For me it's inetutils-2.5
, here is a minimal reproduce:
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/d0e1602ddde669d5beb01aec49d71a51937ed7be";
};
outputs = { self, nixpkgs, ... }:
let
supportedSystems = [ "x86_64-linux" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
devShells = forEachSupportedSystem ({ pkgs }: rec {
default = pkgs.mkShell {
packages = with pkgs; [
inetutils
tunctl
];
};
});
};
}
Describe the bug
network interface name get truncated with ifconfig
To reproduce
https://github.com/scop/bash-completion/blob/2b7fc195aeb404b41bc3e5fa8c1e98f10f1ee26a/bash_completion#L1723-L1738
Then the
_comp_compgen_available_interfaces -a
will returnnameislongLink
instead ofnameislong
Reproduce:
Expected behavior
Versions (please complete the following information)
NixOS 24.05.20240102.bd645e8
echo "$BASH_VERSION"
:5.2.21(1)-release
(IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}")
:2.11
Additional context
It's bug of upstream inetutils, but maybe we can simply use iproute2 as default choose
ip -c=never link show up || ip link show up || ifconfig
https://github.com/scop/bash-completion/blob/2b7fc195aeb404b41bc3e5fa8c1e98f10f1ee26a/bash_completion#L1731-L1733