Hi all, Here's some more digging :- $ ls Net* Network Mapping-_uIOdTfp6Pw.en.srt Network Mapping-_uIOdTfp6Pw.mp4
$ set -x $ touch Net+ local cur prev words cword split + _init_completion -s + local exclude= flag outx errx inx OPTIND=1 + getopts n:e:o:i:s flag -s + case $flag in + split=false + exclude+== + getopts n:e:o:i:s flag -s + COMPREPLY=() + local 'redir=@(?([0-9])<|?([0-9&])>?(>)|>&)' + _get_comp_words_by_ref -n '=<>&' cur prev words cword + 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 words cword + case $flag in + exclude='=<>&' + getopts c:i:n:p:w: flag -n '=<>&' cur prev words cword + [[ 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 + vwords=words + let 'OPTIND += 1' + [[ 6 -ge 6 ]] + case ${!OPTIND} in + vcword=cword + 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='touch Net' + (( i=0, j=0 )) + (( i < 2 )) + [[ 0 -gt 0 ]] + ref='words[0]' + eval 'words[0]=${!ref}${COMP_WORDS[i]}' ++ words[0]=touch + line=' Net' + [[ 0 == 1 ]] + (( i++, j++ )) + (( i < 2 )) + [[ 1 -gt 0 ]] + [[ Net == +([=<>&]) ]] + ref='words[1]' + eval 'words[1]=${!ref}${COMP_WORDS[i]}' ++ words[1]=Net + line= + [[ 1 == 1 ]] + eval cword=1 ++ cword=1 + (( i++, j++ )) + (( i < 2 )) + [[ 2 == 1 ]] + local i cur index=9 'lead=touch Net' + [[ 9 -gt 0 ]] + [[ -n touch Net ]] + [[ -n touchNet ]] + cur='touch Net' + (( i = 0 )) + (( i <= cword )) + [[ 9 -ge 5 ]] + [[ touch != \t\o\u\c\h ]] + [[ 0 -lt 1 ]] + local old_size=9 + cur=' Net' + local new_size=4 + index=4 + (( ++i )) + (( i <= cword )) + [[ 4 -ge 3 ]] + [[ Ne != \N\e\t ]] + cur=Net + (( index-- )) + [[ 3 -ge 3 ]] + [[ Net != \N\e\t ]] + [[ 1 -lt 1 ]] + (( ++i )) + (( i <= cword )) + [[ -n Net ]] + [[ ! -n Net ]] + [[ 3 -lt 0 ]] + local words cword cur + _upvars -a2 words touch Net -v cword 1 -v cur Net + (( 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=Net + 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 Net -v cword 1 -v prev touch -a2 words touch Net + (( 13 )) + (( 13 )) + case $1 in + [[ -n cur ]] + unset -v cur + eval 'cur="$3"' ++ cur=Net + 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=touch + 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 )) + _variables + [[ Net =~ ^(\$\{?)([A-Za-z0-9_]*)$ ]] + return 1 + [[ Net == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]] + [[ touch == @(?([0-9])<|?([0-9&])>?(>)|>&) ]] + local i skip + (( i=1 )) + (( i < 2 )) + [[ Net == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]] + i=2 + (( 1 )) + (( i < 2 )) + [[ 1 -eq 0 ]] + prev=touch + [[ -n false ]] + _split_longopt + [[ Net == --?*=* ]] + return 1 + return 0 + case "${prev,,}" in + false + [[ Net == -* ]] + [[ touch == @(mk|rm)dir ]] + _filedir + local i 'IFS= ' xspec + _tilde Net + local result=0 + [[ Net == \~* ]] + return 0 + local -a toks + local quoted x tmp + _quote_readline_by_ref Net quoted + [[ Net == \'* ]] + printf -v quoted %q Net + [[ Net == \$* ]] ++ compgen -d -- Net + x= + [[ '' != -d ]] + xspec= ++ compgen -f -X '' -- Net + x='Network Mapping-_uIOdTfp6Pw.mp4 Network Mapping-_uIOdTfp6Pw.en.srt' + read -r tmp + toks+=("$tmp") + read -r tmp + toks+=("$tmp") + read -r tmp + [[ -n '' ]] + [[ 2 -ne 0 ]] + compopt -o filenames + COMPREPLY+=("${toks[@]}") work\ Mapping-_uIOdTfp6Pw.+ local cur prev words cword split + _init_completion -s + local exclude= flag outx errx inx OPTIND=1 + getopts n:e:o:i:s flag -s + case $flag in + split=false + exclude+== + getopts n:e:o:i:s flag -s + COMPREPLY=() + local 'redir=@(?([0-9])<|?([0-9&])>?(>)|>&)' + _get_comp_words_by_ref -n '=<>&' cur prev words cword + 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 words cword + case $flag in + exclude='=<>&' + getopts c:i:n:p:w: flag -n '=<>&' cur prev words cword + [[ 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 + vwords=words + let 'OPTIND += 1' + [[ 6 -ge 6 ]] + case ${!OPTIND} in + vcword=cword + 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='touch Network\ Mapping-_uIOdTfp6Pw.' + (( i=0, j=0 )) + (( i < 2 )) + [[ 0 -gt 0 ]] + ref='words[0]' + eval 'words[0]=${!ref}${COMP_WORDS[i]}' ++ words[0]=touch + line=' Network\ Mapping-_uIOdTfp6Pw.' + [[ 0 == 1 ]] + (( i++, j++ )) + (( i < 2 )) + [[ 1 -gt 0 ]] + [[ Network\ Mapping-_uIOdTfp6Pw. == +([=<>&]) ]] + ref='words[1]' + eval 'words[1]=${!ref}${COMP_WORDS[i]}' ++ words[1]='Network\ Mapping-_uIOdTfp6Pw.' + line= + [[ 1 == 1 ]] + eval cword=1 ++ cword=1 + (( i++, j++ )) + (( i < 2 )) + [[ 2 == 1 ]] + local i cur index=35 'lead=touch Network\ Mapping-_uIOdTfp6Pw.' + [[ 35 -gt 0 ]] + [[ -n touch Network\ Mapping-_uIOdTfp6Pw. ]] + [[ -n touchNetwork\Mapping-_uIOdTfp6Pw. ]] + cur='touch Network\ Mapping-_uIOdTfp6Pw.' + (( i = 0 )) + (( i <= cword )) + [[ 35 -ge 5 ]] + [[ touch != \t\o\u\c\h ]] + [[ 0 -lt 1 ]] + local old_size=35 + cur=' Network\ Mapping-_uIOdTfp6Pw.' + local new_size=30 + index=30 + (( ++i )) + (( i <= cword )) + [[ 30 -ge 29 ]] + [[ Network\ Mapping-_uIOdTfp6Pw != \N\e\t\w\o\r\k\\\ \M\a\p\p\i\n\g\-\_\u\I\O\d\T\f\p\6\P\w\. ]] + cur='Network\ Mapping-_uIOdTfp6Pw.' + (( index-- )) + [[ 29 -ge 29 ]] + [[ Network\ Mapping-_uIOdTfp6Pw. != \N\e\t\w\o\r\k\\\ \M\a\p\p\i\n\g\-\_\u\I\O\d\T\f\p\6\P\w\. ]] + [[ 1 -lt 1 ]] + (( ++i )) + (( i <= cword )) + [[ -n Network\ Mapping-_uIOdTfp6Pw. ]] + [[ ! -n Network\Mapping-_uIOdTfp6Pw. ]] + [[ 29 -lt 0 ]] + local words cword cur + _upvars -a2 words touch 'Network\ Mapping-_uIOdTfp6Pw.' -v cword 1 -v cur 'Network\ Mapping-_uIOdTfp6Pw.' + (( 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='Network\ Mapping-_uIOdTfp6Pw.' + 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 'Network\ Mapping-_uIOdTfp6Pw.' -v cword 1 -v prev touch -a2 words touch 'Network\ Mapping-_uIOdTfp6Pw.' + (( 13 )) + (( 13 )) + case $1 in + [[ -n cur ]] + unset -v cur + eval 'cur="$3"' ++ cur='Network\ Mapping-_uIOdTfp6Pw.' + 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=touch + 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 )) + _variables + [[ Network\ Mapping-_uIOdTfp6Pw. =~ ^(\$\{?)([A-Za-z0-9_]*)$ ]] + return 1 + [[ Network\ Mapping-_uIOdTfp6Pw. == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]] + [[ touch == @(?([0-9])<|?([0-9&])>?(>)|>&) ]] + local i skip + (( i=1 )) + (( i < 2 )) + [[ Network\ Mapping-_uIOdTfp6Pw. == @(?([0-9])<|?([0-9&])>?(>)|>&)* ]] + i=2 + (( 1 )) + (( i < 2 )) + [[ 1 -eq 0 ]] + prev=touch + [[ -n false ]] + _split_longopt + [[ Network\ Mapping-_uIOdTfp6Pw. == --?*=* ]] + return 1 + return 0 + case "${prev,,}" in + false + [[ Network\ Mapping-_uIOdTfp6Pw. == -* ]] + [[ touch == @(mk|rm)dir ]] + _filedir + local i 'IFS= ' xspec + _tilde 'Network\ Mapping-_uIOdTfp6Pw.' + local result=0 + [[ Network\ Mapping-_uIOdTfp6Pw. == \~* ]] + return 0 + local -a toks + local quoted x tmp + _quote_readline_by_ref 'Network\ Mapping-_uIOdTfp6Pw.' quoted + [[ Network\ Mapping-_uIOdTfp6Pw. == \'* ]] + printf -v quoted %q 'Network\ Mapping-_uIOdTfp6Pw.' + [[ Network\\\ Mapping-_uIOdTfp6Pw. == \$* ]] ++ compgen -d -- 'Network\\\ Mapping-_uIOdTfp6Pw.' + x= + [[ '' != -d ]] + xspec= ++ compgen -f -X '' -- 'Network\\\ Mapping-_uIOdTfp6Pw.' + x= + [[ -n '' ]] + [[ 0 -ne 0 ]] Now what has happened in the above snippet is I tried to touch the file Network\ Mapping-_uIOdTfp6Pw. <tab> so it gives me option of the two but it doesn't give. Any help would be appreciated. -- Regards, Shirish Agarwal शिरीष अग्रवाल My quotes in this email licensed under CC 3.0 http://creativecommons.org/licenses/by-nc/3.0/ http://flossexperiences.wordpress.com 065C 6D79 A68C E7EA 52B3 8D70 950D 53FB 729A 8B17 _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel