[Bash-completion-devel] [bash-completion-Bugs][312647] problem completing cyrillic filenames

bash-completion-bugs at alioth.debian.org bash-completion-bugs at alioth.debian.org
Thu Aug 19 19:16:25 UTC 2010


Bugs item #312647, was changed at 08.08.2010 23:15 by Ildar Mulyukov
You can respond by visiting: 
https://alioth.debian.org/tracker/?func=detail&atid=413095&aid=312647&group_id=100114

Status: Open
Priority: 3
Submitted By: Ildar Mulyukov (ildar-guest)
Assigned to: Freddy Vulto (fvu-guest)
Summary: problem completing cyrillic filenames 
Distribution: --Distribution-Agnostic--
Originally reported in: None
Milestone: None
Status: None
Original bug number: 


Initial Comment:
$ touch фыва.pdf
$ evince ф<TAB>



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

Comment By: Ildar Mulyukov (ildar-guest)
Date: 20.08.2010 01:16

Message:
yes. It's my fault - I tested a very old version.
Please close - it's NOT A BUG

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

Comment By: Freddy Vulto (fvu-guest)
Date: 18.08.2010 13:27

Message:
What's shown when putting bash in debug mode (set -x)?  This is what I get:

    $ set -x
    $ evince ф<TAB>
+ IFS='
'
+ COMPREPLY=()
+ _get_comp_words_by_ref cur
+ 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 cur
+ [[ 1 -ge 1 ]]
+ case ${!OPTIND} in
+ vcur=cur
+ let 'OPTIND += 1'
+ [[ 1 -ge 2 ]]
+ __get_cword_at_cursor_by_ref '' words cword cur
+ words=()
+ local cword words
+ __reassemble_comp_words_by_ref '' words cword
+ local exclude i j ref                                                                                                     
+ [[ -n '' ]]                                                                                                               
+ eval cword=1                                                                                                              
++ cword=1                                                                                                                  
+ [[ -n '' ]]                                                                                                               
+ eval 'words=(' '"${COMP_WORDS[@]}"' ')'                                                                                   
++ words=("${COMP_WORDS[@]}")                                                                                               
+ local i cur2                                                                                                              
+ local 'cur=evince ф'                                                                                                      
+ local index=9                                                                                                             
+ (( i = 0 ))                                                                                                               
+ (( i <= cword ))                                                                                                          
+ [[ 9 -ge 6 ]]                                                                                                             
+ [[ evince != \e\v\i\n\c\e ]]                                                                                              
+ [[ 0 -lt 1 ]]                                                                                                             
+ local old_size=9                                                                                                          
+ cur=' ф'                                                                                                                  
+ local new_size=3                                                                                                          
+ index=3                                                                                                                   
+ (( ++i  ))                                                                                                                
+ (( i <= cword ))                                                                                                          
+ [[ 3 -ge 2 ]]                                                                                                             
+ [[  � != \�\� ]]                                                                                                          
+ cur=$'�\204'
+ (( index-- ))
+ [[ 2 -ge 2 ]]
+ [[ ф != \�\� ]]
+ [[ 1 -lt 1 ]]
+ (( ++i  ))
+ (( i <= cword ))
+ cur2=$'�\204'
+ local words cword cur
+ _upvars -a2 words evince $'�\204' -v cword 1 -v cur $'�\204'
+ ((  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=$'�\204'
+ shift 3
+ ((  0  ))
+ [[ -n cur ]]
+ upvars+=("$vcur")
+ upargs+=(-v $vcur "$cur")
+ [[ -n '' ]]
+ [[ -n '' ]]
+ [[ -n '' ]]
+ ((  1  ))
+ local cur
+ _upvars -v cur $'�\204'
+ ((  3  ))
+ ((  3  ))
+ case $1 in
+ [[ -n cur ]]
+ unset -v cur
+ eval 'cur="$3"'
++ cur=$'�\204'
+ shift 3
+ ((  0  ))
+ _expand
+ [[ ф == \~*/* ]]
+ [[ ф == \~* ]]
++ awk '/^complete[ \t]+.*[ \t]evince([ \t]|$)/ { print $0; exit }' /home/freddy/proj/bashCompletion/bash-completion.git/bash_completion
+ xspec='complete -f -X '\''!*.@(@(?(e)ps|?(E)PS|pdf|PDF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|fdf|FDF)'\'' evince'
+ xspec=''\''!*.@(@(?(e)ps|?(E)PS|pdf|PDF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|fdf|FDF)'\'' evince'
+ xspec=''\''!*.@(@(?(e)ps|?(E)PS|pdf|PDF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|fdf|FDF)'\'''
+ local -a toks
+ local tmp
+ toks=(${toks[@]-} $(
        compgen -d -- "$(quote_readline "$cur")" | {
        while read -r tmp; do
            # see long TODO comment in _filedir() --David
            printf '%s\n' $tmp
        done
        }
        ))
+++ quote_readline $'�\204'
+++ local quoted
+++ _quote_readline_by_ref $'�\204' ret
+++ [[ � == \' ]]
+++ [[ 3 -le 3 ]]
+++ [[ � == \" ]]
+++ printf -v ret %q $'�\204'
+++ [[ $ == \$ ]]
+++ eval 'ret=$'\''�\204'\'''
++++ ret=$'�\204'
+++ printf %s $'�\204'
++ compgen -d -- $'�\204'
++ read -r tmp
+ toks=(${toks[@]-} $(
        eval compgen -f -X "$xspec" -- "\$(quote_readline "\$cur")" | {
        while read -r tmp; do
            [ -n $tmp ] && printf '%s\n' $tmp
        done
        }
        ))
++ eval compgen -f -X ''\''!*.@(@(?(e)ps|?(E)PS|pdf|PDF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|fdf|FDF)'\''' -- '$(quote_readline $cur)'
++++ quote_readline $'�\204'
++++ local quoted
++++ _quote_readline_by_ref $'�\204' ret
++++ [[ � == \' ]]
++++ [[ 3 -le 3 ]]
++++ [[ � == \" ]]
++++ printf -v ret %q $'�\204'
++++ [[ $ == \$ ]]
++++ eval 'ret=$'\''�\204'\'''
+++++ ret=$'�\204'
++ read -r tmp
++++ printf %s $'�\204'
+++ compgen -f -X '!*.@(@(?(e)ps|?(E)PS|pdf|PDF|dvi|DVI)?(.gz|.GZ|.bz2|.BZ2)|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|fdf|FDF)' -- $'�\204'
++ '[' -n $'�\204�\213ва.pdf' ']'
++ printf '%s\n' $'�\204�\213ва.pdf'
++ read -r tmp
+ COMPREPLY=("${toks[@]}")
ыва.pdf

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

Comment By: Ildar Mulyukov (ildar-guest)
Date: 18.08.2010 12:37

Message:
No error occur. It just doesn't expand.

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

Comment By: Freddy Vulto (fvu-guest)
Date: 18.08.2010 02:46

Message:
I cannot reproduce the bug either.  This is what I get on Debian, bash-3.2.39 with current git:

    $ touch фыва.pdf
    $ evince ф<TAB>  # Expands all right to:
    $ evince фыва.pdf

What is the exact error you get?

Freddy Vulto
http://fvue.nl

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

Comment By: Ildar Mulyukov (ildar-guest)
Date: 09.08.2010 14:46

Message:
Current GIT, but have bash3 here.


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

Comment By: Ville Skyttä  (scop-guest)
Date: 09.08.2010 12:32

Message:
Works fine for me with current git, bash 4.1.7.

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

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



More information about the Bash-completion-devel mailing list