--- embedaddon/mtr/bash-completion/mtr 2019/10/21 14:25:31 1.1.1.1 +++ embedaddon/mtr/bash-completion/mtr 2023/09/27 11:18:58 1.1.1.2 @@ -8,43 +8,43 @@ _mtr_module() '-F'|'--filename') local IFS=$'\n' compopt -o filenames - COMPREPLY=( $(compgen -f -- $cur) ) + COMPREPLY=( $(compgen -f -- "$cur") ) return 0 ;; '-a'|'--address') - COMPREPLY=( $(compgen -W "ADDRESS" -- $cur) ) + COMPREPLY=( $(compgen -W "ADDRESS" -- "$cur") ) return 0 ;; - '-f'|'--first-ttl'|'-m'|'--max-ttl'|'-m'|'--max-unknown'|'-B'|'--bitpattern'|'-Q'|'--tos'|'-c'|'--report-cycles') - COMPREPLY=( $(compgen -W "NUMBER" -- $cur) ) + '-f'|'--first-ttl'|'-m'|'--max-ttl'|'-U'|'--max-unknown'|'-B'|'--bitpattern'|'-Q'|'--tos'|'-c'|'--report-cycles') + COMPREPLY=( $(compgen -W "NUMBER" -- "$cur") ) return 0 ;; '-P'|'--port'|'-L'|'--localport') - COMPREPLY=( $(compgen -W "PORT" -- $cur) ) + COMPREPLY=( $(compgen -W "PORT" -- "$cur") ) return 0 ;; '-s'|'--psize') - COMPREPLY=( $(compgen -W "SIZE" -- $cur) ) + COMPREPLY=( $(compgen -W "SIZE" -- "$cur") ) return 0 ;; '-i'|'--interval'|'-G'|'--gracetime'|'-Z'|'--timeout') - COMPREPLY=( $(compgen -W "SECONDS" -- $cur) ) + COMPREPLY=( $(compgen -W "SECONDS" -- "$cur") ) return 0 ;; '-M'|'--mark') - COMPREPLY=( $(compgen -W "MARK" -- $cur) ) + COMPREPLY=( $(compgen -W "MARK" -- "$cur") ) return 0 ;; '--displaymode') - COMPREPLY=( $(compgen -W "{0..2}" -- $cur) ) + COMPREPLY=( $(compgen -W "{0..2}" -- "$cur") ) return 0 ;; '-y'|'--ipinfo') - COMPREPLY=( $(compgen -W "{0..4}" -- $cur) ) + COMPREPLY=( $(compgen -W "{0..4}" -- "$cur") ) return 0 ;; '-o'|'--order') - COMPREPLY=( $(compgen -W "LDRSNBAWVGJMXI" -- $cur) ) + COMPREPLY=( $(compgen -W "LDRSNBAWVGJMXI" -- "$cur") ) return 0 ;; esac @@ -58,11 +58,11 @@ _mtr_module() --curses --displaymode --gtk --no-dns --show-ips --order --ipinfo --aslookup --help --version ' - COMPREPLY=( $(compgen -W "${OPTS[*]}" -- $cur) ) + COMPREPLY=( $(compgen -W "${OPTS[*]}" -- "$cur") ) return 0 ;; esac - COMPREPLY=( $(compgen -W "ip_address hostname" -- $cur) ) + COMPREPLY=( $(compgen -W "ip_address hostname" -- "$cur") ) return 0 } complete -F _mtr_module mtr