Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prefer using iproute2 instead of ifconfig #1090

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Commits on Aug 26, 2024

  1. fix: prefer using iproute2 instead of ifconfig

    For `_comp_compgen_available_interfaces`, we prefer to use ip
    (iproute) since long interface names will be truncated by ifconfig
    (respective packages in the operating system, e.g. inetutils) [1].
    Even for the other functions that use "ifconfig" and "ip", we change
    to use `ip` because `ip`'s behavior is more uniform among the systems
    and also `ip` is becoming more common in Linux distributions.
    
    [1]: https://github.com/scop/bash-completion/pull/1090/files
    
    Co-authored-by: Koichi Murase <[email protected]>
    Co-authored-by: Yedaya Katsman <[email protected]>
    3 people committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    a6fcf4b View commit details
    Browse the repository at this point in the history
  2. test(xinetd_services): mock a proper /etc/xinetd.d

    To test `_comp_compgen_xinetd_services`, we have been using a
    directory /test/fixtures/shared/bin (which contained two files `arp`
    and `ifconfig`as a mock /etc/xinetd.d.  However, the directory
    /test/fixtures/shared/bin is shared with other tests, and the contents
    of the files therein are not proper xinetd configurations.  We want to
    prepare a separate directory for a mock /etc/xinetd.d.  This patch
    adds it under /test/fixtures/_comp_compgen_xinetd_services/xinetd.d.
    akinomyoga authored and yedayak committed Aug 26, 2024
    Configuration menu
    Copy the full SHA
    c2cafae View commit details
    Browse the repository at this point in the history