[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: complete -p does not quote function names correctly.

From: Koichi Murase
Subject: Re: complete -p does not quote function names correctly.
Date: Fri, 20 May 2022 18:53:35 +0900

> Description:
>         bash allows declaring functions with a name that contains `*'.
>         In the output of `complete -p', those function names will not be
>         quoted which makes the output of `complete -p' output not safe
>         to pass to `eval' or output to a file that will be read by
>         `source'.
>         I think bash should quote the arguments to `-F' in the output of
>         `complete -p'.

Can you try the devel branch? There has been a related fix about a year ago:


With the devel version, the commands you have provided produce the
following result:

$ bash-dev --norc
$ a*x () { echo hi ;}
$ complete -W 'something something' -F 'a*x' hello
$ complete -p hello
complete -W 'something something' -F 'a*x' hello


reply via email to

[Prev in Thread] Current Thread [Next in Thread]