Bugs item #312631, was changed at 2010-07-26 22:46 by Ville Skyttä 
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312631&group_id=100114

>Status: Closed
Priority: 3
Submitted By: Joshua Rodman (jrodman-guest)
Assigned to: Nobody (None)
Summary: p4 completion extension uses 'preprev' feature not supported in 
/etc/bash_completion baseline 
Distribution: Debian
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
I'd love to update the p4 completion to work properly with the current 
bash_completion, but I can't find documentation on what the old preprev did.  
Currently, p4 tab produces:

 _get_comp_words_by_ref(): `preprev': unknown argument

because /etc/bash_completion.d/p4 says:

    COMPREPLY=()
    _get_comp_words_by_ref cur prev preprev

it uses the behavior somehow too:

    elif [ $COMP_CWORD -gt 2 ]; then
        case $prev in
            -t)
                case $preprev in
                    add|edit|reopen)
                        COMPREPLY=( $( compgen -W "$p4filetypes" -- "$cur") )
                        ;;
                    *)
                        ;;
                esac
                ;;
            *)
                ;;
        esac
    fi


Meanwhile the implementation in /etc/bash_completion says:
_get_comp_words_by_ref()
{
[...]
    while [[ $# -ge $OPTIND ]]; do 
        case ${!OPTIND} in
            cur)   vcur=cur ;;
            prev)  vprev=prev ;;
            cword) vcword=cword ;;
            words) vwords=words ;;
            *) echo "bash: $FUNCNAME(): \`${!OPTIND}': unknown argument" \
                1>&2; return 1
        esac
        let "OPTIND += 1"
    done


----------------------------------------------------------------------

>Comment By: Ville Skyttä  (scop-guest)
Date: 2010-07-26 23:55

Message:
Duplicate of #312625:
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312625&group_id=100114

----------------------------------------------------------------------

You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312631&group_id=100114

_______________________________________________
Bash-completion-devel mailing list
Bash-completion-devel@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/bash-completion-devel

Reply via email to