Skip to content

odd behaviour in bash completions

Could be a bash bug or something else. With a local copy of foamToVTK with a -legacy option, the completion function triggers a syntax error.

foamToVTK -le<TAB>

Results in

foamToVTK -lebash: [: -n: integer expression expected
gacy 

The offending line is this one in bash_completion:

    elif [ -n "$cur" -a "${cur#-}" = "${cur}" ]
    then
        # Already started a (non-empty) word that isn't an option