summaryrefslogtreecommitdiff
path: root/completions/tipc
diff options
context:
space:
mode:
authorGabriel F. T. Gomes <gabriel@inconstante.net.br>2020-01-24 19:24:09 -0300
committerGabriel F. T. Gomes <gabriel@inconstante.net.br>2020-01-24 19:24:09 -0300
commit019f3cc463db63abc6460f97deb488deec43840b (patch)
tree08cd5387d6c8af6f688d6468c7e2ae9f25c449be /completions/tipc
parent5732da2af736c40cf693354485446ab4867ecb4d (diff)
downloadbash-completion-019f3cc463db63abc6460f97deb488deec43840b.tar.gz
New upstream version 2.10upstream/2.10
Diffstat (limited to 'completions/tipc')
-rw-r--r--completions/tipc7
1 files changed, 3 insertions, 4 deletions
diff --git a/completions/tipc b/completions/tipc
index d85f5e9c..830040d9 100644
--- a/completions/tipc
+++ b/completions/tipc
@@ -65,10 +65,9 @@ _tipc_link() {
# awk drops link state and last trailing :
local links=$(tipc link list 2>/dev/null | \
awk '{print substr($1, 0, length($1))}')
- if [[ $filter == "peers" ]]; then
- links=$(command sed '/broadcast-link/d' <<<"$links")
- fi
- COMPREPLY=( $(compgen -W '$links' -- $cur) )
+ local -a exclude
+ [[ $filter == peers ]] && exclude=( -X broadcast-link )
+ COMPREPLY=( $(compgen "${exclude[@]}" -W '$links' -- $cur) )
fi
}