Hello people, please consider the following snippet: --->8--- _foo() { local cur prev words cword _init_completion -n = || return case $cur in bar=*) cur=${cur#*=} _filedir return 0 ;; esac
_expand || return 0 COMPREPLY=( $(compgen -W 'bar' -S'=' -- "$cur") ) return 0 } complete -F _foo -o nospace foo ---8<--- What I get is: $ foo bar=<TAB> abc bla foo $ foo bar=b<TAB> $ foo bla You can see this in action with our current dd(1) completion. I lost myself, while debugging this, at around line 710 of the main script, i.e. I can see that in my "set -x" log, but the subsequent log lines seem to come from somewhere else. _split_longopt, maybe? (but I haven't passed -s to _init_completion...). Anyone care to have a look? :) Thanks, David (btw, tonight I released 1.99. No big announcements this time -- I was kinda sleepy too -- I'll make a big announce on 2.0 proper) -- . ''`. Debian developer | http://wiki.debian.org/DavidPaleino : :' : Linuxer #334216 --|-- http://www.hanskalabs.net/ `. `'` GPG: 1392B174 ----|---- http://deb.li/dapal `- 2BAB C625 4E66 E7B8 450A C3E1 E6AA 9017 1392 B174
signature.asc
Description: PGP signature
_______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel