You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
1234567891011121314 |
- #!/usr/bin/env bash
-
- _sitegen()
- {
- cur=${COMP_WORDS[COMP_CWORD]}
- if [ $COMP_CWORD -eq 2 ]
- then
- confs=$(env ls /etc/sitegen/ 2>/dev/null | sed 's/\.[^.]*$//' | sort | uniq | sed 's/^sitegen$//')
- COMPREPLY=($(compgen -W "${confs}" "${cur}"))
- else
- COMPREPLY=()
- fi
- }
- #complete -F _sitegen sitegen
|