--- bash_completion 2004-05-17 18:26:30 +0300 +++ bash_completion 2004-05-18 14:59:53 +0300 @@ -11,20 +11,36 @@ _expand || return 0 - case "$prev" in - --@(config|password-file|include-from|exclude-from)) - _filedir - return 0 - ;; - -@(T|-temp-dir|-compare-dest)) - _filedir -d - return 0 - ;; - -@(e|-rsh)) - COMPREPLY=( $( compgen -W 'rsh ssh' -- $cur ) ) - return 0 - ;; - esac + # foo=bar style option + if [[ "$cur" == *=* ]]; then + prev=${cur/=*/} + cur=${cur/*=/} + case "$prev" in + --@(config|password-file|include-from|exclude-from)) + _filedir + return 0 + ;; + --@(temp-dir|compare-dest)) + _filedir -d + return 0 + ;; + --rsh) + COMPREPLY=( $( compgen -W 'rsh ssh' -- $cur ) ) + return 0 + ;; + esac + else + case "$prev" in + -T) + _filedir -d + return 0 + ;; + -e) + COMPREPLY=( $( compgen -W 'rsh ssh' -- $cur ) ) + return 0 + ;; + esac + fi case "$cur" in -*)