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

refactor(mtr): deprecate our completion, upstream >= 0.88 has one #1261

Merged
merged 1 commit into from
Nov 7, 2024
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
2 changes: 1 addition & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -2697,7 +2697,7 @@ _comp_compgen_known_hosts__impl()
_comp_compgen -v known_hosts -c "$prefix$cur" ltrim_colon "${known_hosts[@]}"
}
complete -F _comp_complete_known_hosts traceroute traceroute6 \
fping fping6 telnet rsh rlogin ftp dig drill mtr ssh-installkeys showmount
fping fping6 telnet rsh rlogin ftp dig drill ssh-installkeys showmount

# Convert the word index in `words` to the index in `COMP_WORDS`.
# @param $1 Index in the array WORDS.
Expand Down
1 change: 1 addition & 0 deletions completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,7 @@ bashcomp_DATA = 2to3 \
mplayer \
mr \
msynctool \
_mtr \
mtx \
munindoc \
munin-node-configure \
Expand Down
8 changes: 8 additions & 0 deletions completions/_mtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# mtr(8) completion -*- shell-script -*-

# Use of this file is deprecated.
# Upstream completion is available in mtr >= 0.88, use that instead.

complete -F _comp_complete_known_hosts mtr

# ex: filetype=sh
1 change: 1 addition & 0 deletions test/t/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -390,6 +390,7 @@ EXTRA_DIST = \
test_mr.py \
test_msgsnarf.py \
test_msynctool.py \
test_mtr.py \
test_mtx.py \
test_munin_node_configure.py \
test_munin_run.py \
Expand Down
7 changes: 7 additions & 0 deletions test/t/test_mtr.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pytest


class TestMtr:
@pytest.mark.complete("mtr ")
def test_basic(self, completion):
assert completion