On Thu, 20 Oct 2011 20:47:45 +0300 Ville Skyttä <ville.sky...@iki.fi> wrote: > No comments yet? If there are none or there are no strong objections > soon, I'm going to merge this to master soon
I have tested dynamic loading now. That's what I don't like or understand: 1. > # If full path below completions dir exists, use it. > if [[ $1 == */* && -f "$compdir/$1" ]]; then > . "$compdir/$1" &>/dev/null && return 124 || return 1 > fi Why try to load different completions for the same program. If I understand this code correctly, this will try to load "completions/usr/bin/mycommand" if I try to complete on "/usr/bin/mycommand smth" and "completions/../../bin/mycommand" if I do $ cd /usr/doc/x-1.0/ $ ../../bin/mycommand smth<TAB> I don't see why this is needed. We can even accidentally load some wrong script. I suggest removing quoted lines entirely. 2. > # Special case for init.d scripts. > if [[ $1 == /etc?(/rc.d)/init.d/* ]]; then > . "$compdir/service" &>/dev/null && return 124 || return 1 > fi This special case will not work if one do $ cd /etc $ ./init.d/rc.mpd st<TAB> To my mind this case is not that necessary. We can merge completions/service to bash_completion script. -- Igor _______________________________________________ Bash-completion-devel mailing list Bash-completion-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/bash-completion-devel