Skip to content

Commit

Permalink
test: [debug] dump
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga committed Mar 10, 2024
1 parent 6800769 commit e826e74
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions completions/ip
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,27 @@ _comp_cmd_ip__netns()

_comp_cmd_ip__link_types()
{
{
echo '==== test1 ===='
${1-ip} -c=never link help
echo '==== test2 ===='
${1-ip} link help
echo '==== test3 ===='
{
${1-ip} -c=never link help || ${1-ip} link help
} 2>/dev/null |
command sed '/TYPE := /,/}/!d'
echo '==== test4 ===='
{
${1-ip} -c=never link help || ${1-ip} link help
} 2>/dev/null |
command sed '/TYPE := /,/}/!d;s/.*{//;s/}.*//'
echo '==== test5 ===='
{
${1-ip} -c=never link help || ${1-ip} link help
} 2>/dev/null |
command sed '/TYPE := /,/}/!d;s/.*{//;s/}.*//;s/|/ /g'
} >&2
_comp_compgen_split -- "$(
{
${1-ip} -c=never link help || ${1-ip} link help
Expand Down

0 comments on commit e826e74

Please sign in to comment.