added bash completions
parent
f055fc0cd7
commit
2cbe78b11a
|
|
@ -0,0 +1,15 @@
|
||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
if command -v hosts > /dev/null; then
|
||||||
|
__hosts_completions() {
|
||||||
|
local OPTS=("add list remove")
|
||||||
|
COMPREPLY=()
|
||||||
|
for _opt_ in ${OPTS[@]}; do
|
||||||
|
if [[ "$_opt_" == "$2"* ]]; then
|
||||||
|
COMPREPLY+=("$_opt_")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
complete -F __hosts_completions
|
||||||
|
fi
|
||||||
Loading…
Reference in New Issue