Package: ipset
Version: 6.30-2
Severity: minor

I'm getting a bash completion error on a new server I've just set up. This 
actually doesn't happen on my desktop, though both are running up-to-date 
stretch.

I'm attaching the output I get when running 'bash -lx' and then typing 'ipset 
de[TAB]'

I don't know that much about bash debugging so do let me know if I there's 
something else I should do.

Without debugging it's just this:

# ipset de-bash: syntax error in conditional expression
-bash: syntax error near `2'

-- System Information:
Debian Release: stretch/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 4.8.0-2-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE= (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)

Versions of packages ipset depends on:
ii  iptables   1.6.0-4
ii  libc6      2.24-8
ii  libipset3  6.30-2

ipset recommends no packages.

ipset suggests no packages.

-- debconf-show failed

# ipset de+ local compfile=./completions
+ [[ /usr/share/bash-completion/bash_completion == */* ]]
+ compfile=/usr/share/bash-completion/completions
+ compfile+=/ipset
+ [[ -f /usr/share/bash-completion/completions/ipset ]]
+ . /usr/share/bash-completion/completions/ipset
+ return 124
+ local cur prev cword words ips_version
+ local str_action str_setname str_type str_filename
+ local str_glob str_regex str_prefix str_suffix
+ local str_tmp= str_var=
+ local str_timeout=timeout 'str_order=before after' str_forceadd=
+ local str_counters= str_bp_counters= str_comment= str_markmask=
+ local str_skbinfo= str_skbflags=
+ local -i i=x=y=0
+ local -i got_bashcompl=got_action=action_index=order_index=set_has_timeout=0
+ local -i got_bp_proto=0
+ local -i ignore_errors=use_file=names_only=headers_only=save_format=res_sort=0
+ arr_sets=()
+ arr_types=()
+ arr_members=()
+ arr_unknown_opts=()
+ local arr_sets arr_types arr_members arr_unknown_opts
+ arr_dupe_cmd_opts=()
+ arr_used_opts=()
+ arr_tmp=()
+ local arr_dupe_cmd_opts arr_used_opts arr_tmp
+ arr_opts=("-! -exist" "-o -output" "-q -quiet" "-r -resolve" "-s -sorted" "-n 
-name" "-t -terse" "-f -file")
+ local arr_opts
+ arr_icmp_types=(echo-reply pong network-unreachable host-unreachable 
protocol-unreachable port-unreachable fragmentation-needed source-route-failed 
network-unknown host-unknown network-prohibited host-prohibited 
TOS-network-unreachable TOS-host-unreachable communication-prohibited 
host-precedence-violation precedence-cutoff source-quench network-redirect 
host-redirect TOS-network-redirect TOS-host-redirect echo-request ping 
router-advertisement router-solicitation ttl-zero-during-transit 
ttl-zero-during-reassembly ip-header-bad required-option-missing 
timestamp-request timestamp-reply address-mask-request address-mask-reply)
+ local arr_icmp_types
+ arr_icmp6_types=(no-route communication-prohibited address-unreachable 
port-unreachable packet-too-big ttl-zero-during-transit 
ttl-zero-during-reassembly bad-header unknown-header-type unknown-option 
echo-request ping echo-reply pong router-solicitation router-advertisement 
neighbour-solicitation neigbour-solicitation neighbour-advertisement 
neigbour-advertisement redirect)
+ local arr_icmp6_types
+ (( 4 < 4 ))
+ COMPREPLY=()
++ ipset version
+ ips_version='ipset v6.30, protocol version: 6'
+ ips_version='6.30, protocol version: 6'
+ ips_version=6.30
+ read -a ips_version
+ [[ 6 = +([[:digit:]]) ]]
+ (( ips_version[0] < 6 ))
+ (( ips_version[0] > 6 ))
+ (( ips_version[0] == 6 ))
+ (( ips_version[1] >= 22 ))
+ str_comment=comment
+ str_markmask=markmask
+ str_forceadd=forceadd
+ str_skbinfo=skbinfo
+ str_skbflags='skbmark skbprio skbqueue'
+ got_bp_proto=1
+ declare -f _get_comp_words_by_ref
+ got_bashcompl=1
+ _get_comp_words_by_ref -n : cur prev cword words
+ local exclude flag i OPTIND=1
+ words=()
+ local cur cword words
+ upargs=()
+ upvars=()
+ local upargs upvars vcur vcword vprev vwords
+ getopts c:i:n:p:w: flag -n : cur prev cword words
+ case $flag in
+ exclude=:
+ getopts c:i:n:p:w: flag -n : cur prev cword words
+ [[ 6 -ge 3 ]]
+ case ${!OPTIND} in
+ vcur=cur
+ let 'OPTIND += 1'
+ [[ 6 -ge 4 ]]
+ case ${!OPTIND} in
+ vprev=prev
+ let 'OPTIND += 1'
+ [[ 6 -ge 5 ]]
+ case ${!OPTIND} in
+ vcword=cword
+ let 'OPTIND += 1'
+ [[ 6 -ge 6 ]]
+ case ${!OPTIND} in
+ vwords=words
+ let 'OPTIND += 1'
+ [[ 6 -ge 7 ]]
+ __get_cword_at_cursor_by_ref : words cword cur
+ words=()
+ local cword words
+ __reassemble_comp_words_by_ref : words cword
+ local exclude i j line ref
+ [[ -n : ]]
+ exclude=:
+ eval cword=1
++ cword=1
+ [[ -n : ]]
+ line='ipset de'
+ (( i=0, j=0 ))
+ (( i < 2 ))
+ [[ 0 -gt 0 ]]
+ ref='words[0]'
+ eval 'words[0]=${!ref}${COMP_WORDS[i]}'
++ words[0]=ipset
+ line=' de'
+ [[ 0 == 1 ]]
+ (( i++, j++ ))
+ (( i < 2 ))
+ [[ 1 -gt 0 ]]
+ [[ de == +([:]) ]]
+ ref='words[1]'
+ eval 'words[1]=${!ref}${COMP_WORDS[i]}'
++ words[1]=de
+ line=
+ [[ 1 == 1 ]]
+ eval cword=1
++ cword=1
+ (( i++, j++ ))
+ (( i < 2 ))
+ [[ 2 == 1 ]]
+ local i cur index=8 'lead=ipset de'
+ [[ 8 -gt 0 ]]
+ [[ -n ipset de ]]
+ [[ -n ipsetde ]]
+ cur='ipset de'
+ (( i = 0 ))
+ (( i <= cword ))
+ [[ 8 -ge 5 ]]
+ [[ ipset != \i\p\s\e\t ]]
+ [[ 0 -lt 1 ]]
+ local old_size=8
+ cur=' de'
+ local new_size=3
+ index=3
+ (( ++i  ))
+ (( i <= cword ))
+ [[ 3 -ge 2 ]]
+ [[  d != \d\e ]]
+ cur=de
+ (( index-- ))
+ [[ 2 -ge 2 ]]
+ [[ de != \d\e ]]
+ [[ 1 -lt 1 ]]
+ (( ++i  ))
+ (( i <= cword ))
+ [[ -n de ]]
+ [[ ! -n de ]]
+ [[ 2 -lt 0 ]]
+ local words cword cur
+ _upvars -a2 words ipset de -v cword 1 -v cur de
+ ((  10  ))
+ ((  10  ))
+ case $1 in
+ [[ -n 2 ]]
+ printf %d 2
+ [[ -n words ]]
+ unset -v words
+ eval 'words=("${@:3:2}")'
++ words=("${@:3:2}")
+ shift 4
+ ((  6  ))
+ case $1 in
+ [[ -n cword ]]
+ unset -v cword
+ eval 'cword="$3"'
++ cword=1
+ shift 3
+ ((  3  ))
+ case $1 in
+ [[ -n cur ]]
+ unset -v cur
+ eval 'cur="$3"'
++ cur=de
+ shift 3
+ ((  0  ))
+ [[ -n cur ]]
+ upvars+=("$vcur")
+ upargs+=(-v $vcur "$cur")
+ [[ -n cword ]]
+ upvars+=("$vcword")
+ upargs+=(-v $vcword "$cword")
+ [[ -n prev ]]
+ [[ 1 -ge 1 ]]
+ upvars+=("$vprev")
+ upargs+=(-v $vprev "${words[cword - 1]}")
+ [[ -n words ]]
+ upvars+=("$vwords")
+ upargs+=(-a${#words[@]} $vwords "${words[@]}")
+ ((  4  ))
+ local cur cword prev words
+ _upvars -v cur de -v cword 1 -v prev ipset -a2 words ipset de
+ ((  13  ))
+ ((  13  ))
+ case $1 in
+ [[ -n cur ]]
+ unset -v cur
+ eval 'cur="$3"'
++ cur=de
+ shift 3
+ ((  10  ))
+ case $1 in
+ [[ -n cword ]]
+ unset -v cword
+ eval 'cword="$3"'
++ cword=1
+ shift 3
+ ((  7  ))
+ case $1 in
+ [[ -n prev ]]
+ unset -v prev
+ eval 'prev="$3"'
++ prev=ipset
+ shift 3
+ ((  4  ))
+ case $1 in
+ [[ -n 2 ]]
+ printf %d 2
+ [[ -n words ]]
+ unset -v words
+ eval 'words=("${@:3:2}")'
++ words=("${@:3:2}")
+ shift 4
+ ((  0  ))
+ (( got_bashcompl ))
+ declare -F _ipset_known_hosts
++ declare -f _known_hosts_real
++ grep -Ev '^(\{|\})'
++ grep -Ev '^_known_hosts_real.*$'
++ grep -v __ltrim_colon_completions
+ eval '_ipset_known_hosts() { ' local configfile flag 'prefix;' local cur curd 
awkcur user suffix aliases i 'host;' local -a kh khd 'config;' local 
'OPTIND=1;' while getopts '"acF:p:"' flag '"$@";' do case '$flag' in 'a)' 
'aliases='\''yes'\''' ';;' 'c)' 'suffix='\'':'\''' ';;' 'F)' 
'configfile=$OPTARG' ';;' 'p)' 'prefix=$OPTARG' ';;' 'esac;' 'done;' '[[' '$#' 
-lt '$OPTIND' ']]' '&&' echo '"error:' '$FUNCNAME:' missing mandatory argument 
'CWORD";' 'cur=${!OPTIND};' let '"OPTIND' += '1";' '[[' '$#' -ge '$OPTIND' ']]' 
'&&' echo '"error:' '$FUNCNAME("$@"):' unprocessed 'arguments:"' '$(while' '[[' 
'$#' -ge '$OPTIND' ']];' do printf ''\''%s\n'\''' '${!OPTIND};' 'shift;' 
'done);' '[[' '$cur' == '*@*' ']]' '&&' 'user=${cur%@*}@' '&&' 'cur=${cur#*@};' 
'kh=();' if '[[' -n '$configfile' ']];' then '[[' -r '$configfile' ']]' '&&' 
'config+=("$configfile");' else for i in /etc/ssh/ssh_config '~/.ssh/config' 
'~/.ssh2/config;' do '[[' -r '$i' ']]' '&&' 'config+=("$i");' 'done;' 'fi;' if 
'[[' '${#config[@]}' -gt 0 ']];' then local 'OIFS=$IFS' 'IFS='\''' \' 'j;' 
local -a 'tmpkh;' 'tmpkh=($(' awk ''\''sub("^[' 
'\t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee]['
 '\t]+",' '"")' '{' print '$0' '}'\''' '"${config[@]}"' '|' sort -u '));' 
'IFS=$OIFS;' for i in '"${tmpkh[@]}";' do while '[[' '$i' '=~' 
'^([^\"]*)\"([^\"]*)\"(.*)$' ']];' do 'i=${BASH_REMATCH[1]}${BASH_REMATCH[3]};' 
'j=${BASH_REMATCH[2]};' __expand_tilde_by_ref 'j;' '[[' -r '$j' ']]' '&&' 
'kh+=("$j");' 'done;' for j in '$i;' do __expand_tilde_by_ref 'j;' '[[' -r '$j' 
']]' '&&' 'kh+=("$j");' 'done;' 'done;' 'fi;' if '[[' -z '$configfile' ']];' 
then for i in /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 
/etc/known_hosts /etc/known_hosts2 '~/.ssh/known_hosts' '~/.ssh/known_hosts2;' 
do '[[' -r '$i' ']]' '&&' 'kh+=("$i");' 'done;' for i in /etc/ssh2/knownhosts 
'~/.ssh2/hostkeys;' do '[[' -d '$i' ']]' '&&' 'khd+=("$i"/*pub);' 'done;' 'fi;' 
if '[[' '${#kh[@]}' -gt 0 '||' '${#khd[@]}' -gt 0 ']];' then 
'awkcur=${cur//\//\\\/};' 'awkcur=${awkcur//\./\\\.};' 'curd=$awkcur;' if '[[' 
'"$awkcur"' == '[0-9]*[.:]*' ']];' then 'awkcur="^$awkcur[.:]*";' else if '[[' 
'"$awkcur"' == 1 2 ']];' then 'awkcur="^$awkcur.*[.:]";' else if '[[' -z 
'$awkcur' ']];' then 'awkcur="[a-z.:]";' else 'awkcur="^$awkcur";' 'fi;' 'fi;' 
'fi;' if '[[' '${#kh[@]}' -gt 0 ']];' then 'COMPREPLY+=($(' awk ''\''BEGIN' 
'{FS=","}' '/^\s*[^|\#]/' '{' 'sub("^@[^' ']+' '+",' '"");' '\' 'sub("' '.*$",' 
'"");' '\' for '(i=1;' 'i<=NF;' '++i)' '{' '\' 'sub("^\\[",' '"",' '$i);' 
'sub("\\](:[0-9]+)?$",' '"",' '$i);' '\' if '($i' '!~' '/[*?]/' '&&' '$i' '~' 
'/'\''"$awkcur"'\''/)' '{print' '$i}' '\' '}}'\''' '"${kh[@]}"' '2>/dev/null' 
'));' 'fi;' if '[[' '${#khd[@]}' -gt 0 ']];' then for i in '"${khd[@]}";' do if 
'[[' '"$i"' == '*key_22_$curd*.pub' '&&' -r '"$i"' ']];' then 
'host=${i/#*key_22_/};' 'host=${host/%.pub/};' 'COMPREPLY+=($host);' 'fi;' 
'done;' 'fi;' for '((i=0;' i '<' '${#COMPREPLY[@]};' i++ '))' do 
'COMPREPLY[i]=$prefix$user${COMPREPLY[i]}$suffix;' 'done;' 'fi;' if '[[' 
'${#config[@]}' -gt 0 '&&' -n '"$aliases"' ']];' then local 'hosts=$(' sed -ne 
''\''s/^[' '\t]*[Hh][Oo][Ss][Tt]\([Nn][Aa][Mm][Ee]\)\{0,1\}['\''"$'\''\t' 
''\''"'\'']\{1,\}\([^#*?]*\)\(#.*\)\{0,1\}$/\2/p'\''' '"${config[@]}"' ');' 
'COMPREPLY+=($(' compgen -P '"$prefix$user"' -S '"$suffix"' -W '"$hosts"' -- 
'"$cur"' '));' 'fi;' 'COMPREPLY+=($(' compgen -W '"$(' ruptime '2>/dev/null' 
'|' awk ''\''!/^ruptime:/' '{' print '$1' '}'\''' ')"' -- '"$cur"' '));' if 
'[[' -n '${COMP_KNOWN_HOSTS_WITH_HOSTFILE-1}' ']];' then 'COMPREPLY+=($(' 
compgen -A hostname -P '"$prefix$user"' -S '"$suffix"' -- '"$cur"' '));' 'fi;' 
return '0; }'
bash: syntax error in conditional expression
bash: syntax error near `2'
+ [[ -n '' ]]
+ (( i=1 ))
+ (( i < 2-1 ))
+ [[ -n '' ]]
+ (( names_only && headers_only ))
+ (( names_only || headers_only ))
+ (( ignore_errors ))
+ [[ de == \$\(* ]]
+ [[ de == \$\{* ]]
+ [[ de == \$* ]]
+ case "$prev" in
+ (( got_action ))
+ [[ ipset = - ]]
+ [[ de = -* ]]
+ (( save_format || names_only || headers_only ))
+ (( res_sort ))
+ (( ignore_errors && use_file ))
+ (( ignore_errors ))
+ (( use_file ))
+ COMPREPLY=($( compgen -W 'create n add del test destroy x list save \
        restore flush rename e swap w help version' -- "$cur" ))
++ compgen -W 'create n add del test destroy x list save \
        restore flush rename e swap w help version' -- de
+ [[ -n '' ]]

Reply via email to