mirror of
https://github.com/traviscross/mtr.git
synced 2024-09-21 10:27:10 +00:00
fix shellcheck warnings
This commit is contained in:
parent
8089904ca6
commit
2e837dee7c
@ -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'|'-U'|'--max-unknown'|'-B'|'--bitpattern'|'-Q'|'--tos'|'-c'|'--report-cycles')
|
||||
COMPREPLY=( $(compgen -W "NUMBER" -- $cur) )
|
||||
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
|
||||
|
@ -7,7 +7,7 @@
|
||||
#
|
||||
|
||||
if [ $# -lt 3 ]; then
|
||||
echo Usage: mangen.sh VERSION IN OUT
|
||||
echo "Usage: mangen.sh VERSION IN OUT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
@ -20,10 +20,10 @@ OUT=$3
|
||||
# URL completely disappear from man pages. We need to strip
|
||||
# those codes out when building for MacOS
|
||||
#
|
||||
if [ $(uname -s) = "Darwin" ]; then
|
||||
if [ "$(uname -s)" = "Darwin" ]; then
|
||||
RMURUE='-e s/\.UR.//g -e s/\.UE//g'
|
||||
else
|
||||
RMURUE=""
|
||||
fi
|
||||
|
||||
sed -e "s|@VERSION[@]|$VERSION|g" $RMURUE $IN >$OUT
|
||||
sed -e "s|@VERSION[@]|$VERSION|g" $RMURUE "$IN" >"$OUT"
|
||||
|
Loading…
Reference in New Issue
Block a user