mirror of
https://github.com/roswell/roswell.git
synced 2026-09-10 07:16:17 -04:00
bash completion
This commit is contained in:
parent
abab2704ed
commit
cde7e6ccc4
21
etc/bash-completion.d/ros
Executable file
21
etc/bash-completion.d/ros
Executable file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
# currently just a stub.
|
||||
# would it be possible to generate the completion from the roswell scripts by themselves?
|
||||
|
||||
# https://www.debian-administration.org/article/317/An_introduction_to_bash_completion_part_2
|
||||
|
||||
_ros()
|
||||
{
|
||||
local cur prev opts
|
||||
COMPREPLY=()
|
||||
cur="${COMP_WORDS[COMP_CWORD]}"
|
||||
prev="${COMP_WORDS[COMP_CWORD-1]}"
|
||||
opts="--help --verbose --version"
|
||||
|
||||
if [[ ${cur} == -* ]] ; then
|
||||
COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) )
|
||||
return 0
|
||||
fi
|
||||
}
|
||||
complete -F _ros ros
|
||||
Loading…
Reference in a new issue