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(ip): Don't offer neighbour, only neighbor #1318

Merged
merged 1 commit into from
Jan 22, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions completions/ip
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,9 @@ _comp_cmd_ip()
'/OBJECT := /,/}/!d' -e \
's/.*{//' -e \
's/}.*//' -e \
's/|//g'
)"
's/|//g' -e \
's/neighbour/neighbor/g'
)" # We remove "neighbour" to only leave one option when completing `ip neig`
;;
esac
return
Expand Down
8 changes: 8 additions & 0 deletions test/t/test_ip.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,14 @@ def test_stats(self, completion):
def test_neigh_state(self, completion):
assert "stale" in completion

@pytest.mark.complete(
"ip neig",
require_cmd=True,
skipif="ip neighbor help 2>/dev/null; (( $? != 255 ))",
)
def test_neigh_one_completion(self, completion):
assert len(completion) == 1
yedayak marked this conversation as resolved.
Show resolved Hide resolved

@pytest.mark.complete(
"ip monitor ",
require_cmd=True,
Expand Down
Loading