bash-completion.sh
branchv_0
changeset 29 dc3c102e1264
parent 5 ee4ba9f5a053
child 30 02972f051744
equal deleted inserted replaced
28:4cbd9c0beb4c 29:dc3c102e1264
     1 # ShaderShark
     1 # OHP3D
     2 # Copyright © 2023 František Kučera (Frantovo.cz, GlobalCode.info)
     2 # Copyright © 2023 František Kučera (Frantovo.cz, GlobalCode.info)
     3 #
     3 #
     4 # This program is free software: you can redistribute it and/or modify
     4 # This program is free software: you can redistribute it and/or modify
     5 # it under the terms of the GNU General Public License as published by
     5 # it under the terms of the GNU General Public License as published by
     6 # the Free Software Foundation, version 3 of the License.
     6 # the Free Software Foundation, version 3 of the License.
    11 # GNU General Public License for more details.
    11 # GNU General Public License for more details.
    12 #
    12 #
    13 # You should have received a copy of the GNU General Public License
    13 # You should have received a copy of the GNU General Public License
    14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
    14 # along with this program. If not, see <http://www.gnu.org/licenses/>.
    15 
    15 
    16 _shader_shark_completion() {
    16 _ohp3d_completion() {
    17 	local w0 w1 w2 w3
    17 	local w0 w1 w2 w3
    18 
    18 
    19 	COMPREPLY=()
    19 	COMPREPLY=()
    20 	w0=${COMP_WORDS[COMP_CWORD]}
    20 	w0=${COMP_WORDS[COMP_CWORD]}
    21 	w1=${COMP_WORDS[COMP_CWORD-1]}
    21 	w1=${COMP_WORDS[COMP_CWORD-1]}
    50 		)
    50 		)
    51 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
    51 		COMPREPLY=($(compgen -W "${OPTIONS[*]}" -- "$w0"))
    52 	fi
    52 	fi
    53 }
    53 }
    54 
    54 
    55 complete -F _shader_shark_completion shader-shark
    55 complete -F _ohp3d_completion ohp3d