Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _avail_kernel_builds()
- {
- case $COMP_CWORD in
- 1)
- if [[ "${COMP_WORDS[COMP_CWORD]}" =~ ^[0-9] ]];then
- COMPREPLY=( /secure/kernel_builds/"${COMP_WORDS[COMP_CWORD]}"* )
- else
- COMPREPLY=( /secure/kernel_builds/"${COMP_WORDS[COMP_CWORD]}"[0-9]*/ )
- fi
- COMPREPLY=( "${COMPREPLY[@]#/secure/kernel_builds/}" )
- COMPREPLY=( "${COMPREPLY[@]%/}" )
- ;;
- esac
- }
- _avail_kernel_builds() {
- case $COMP_CWORD in
- 1) COMPREPLY=( $(cd /secure/kernel_builds; compgen -d -X "source") ) ;;
- esac
- }
- _avail_kernel_builds() {
- case $COMP_CWORD in
- 1) COMPREPLY=( $(cd /secure/kernel_builds; compgen -d -X "source") ) ;;
- esac
- }
- declare -a accept
- declare -a reject
- for s in "${COMPREPLY[@]}"; do
- if [[ "$s" =~ want ]]; then
- accept=( "${accept[@]}" "$s" )
- else
- reject=( "${reject[@]}" "$s" )
- fi
- done
Add Comment
Please, Sign In to add comment