[Bash-completion-devel] [patch] rfc on it

Thilo Six mlist at Xk2c.de
Tue Nov 5 20:34:06 UTC 2013


Hello,

attached is a patch which i would like you to review and comment on the changes
if they are worth to be included.
I did change the following:

1) The case statement at the top is there to check if the shell that sources is
interactive.

2) the test for $BASH_COMPLETION_COMPAT_DIR shall prevent sourcing completions
more then once.

3) There are some case where 'type' is used (which also return aliases) where
iiuc 'type -p' is intended.

4) Then there are some locale aware commands not protected by 'LC_ALL=c'.

5) Lastly iiuc $BASH_COMPLETION_COMPAT_DIR/$i should be escaped.



Finally a question e.g.:
if type -p foo; then
	\foo
        ^- missing

There are cases where it explicitly tests for the on disk prog and then happily
accepts functions and aliases.
I wonder if makes sense to stay explicit and circumvent aliase and functions
defined by the user. If patches would be welcome i am willing to spend some time
on that.



kind regards,

     Thilo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bash_completion.patch
Type: text/x-diff
Size: 3329 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/bash-completion-devel/attachments/20131105/22d8226b/attachment.patch>


More information about the Bash-completion-devel mailing list