Skip to content

Commit

Permalink
Add missing bash-completion/completions/srv6
Browse files Browse the repository at this point in the history
  • Loading branch information
louisroyer committed Jul 2, 2024
1 parent 1e5dd03 commit af41013
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions bash-completion/completions/srv6
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#! /bin/bash

: ${PROG:=$(basename ${BASH_SOURCE})}

_cli_bash_autocomplete() {
if [[ "${COMP_WORDS[0]}" != "source" ]]; then
local cur opts base
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
if [[ "$cur" == "-"* ]]; then
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} ${cur} --generate-bash-completion )
else
opts=$( ${COMP_WORDS[@]:0:$COMP_CWORD} --generate-bash-completion )
fi
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
return 0
fi
}

complete -o bashdefault -o default -o nospace -F _cli_bash_autocomplete $PROG
unset PROG

0 comments on commit af41013

Please sign in to comment.