warning: command substitution: ignored null byte in input
after installing bash-completion I started to have this.
when doing the bash prompt completion (with tabs) -
"warning: command substitution: ignored null byte in input"
Please follow the instructions in README.md's Troubleshooting section.
I'm experiencing the same issue. The README.md's Troubleshooting section is useless. You are expecting users to find a debug error within the countless debug lines returned from a tab completion?
I think you should carefully read the Troubleshooting section once again.
Quoting from the mentioned section, with emphasis
This will produce useful debugging output that will aid us in fixing the problem if you are unable to do so yourself.
And
please attach the generated debugging output in
set -xmode copy-pasted to a separate, attached file in the report. Before doing so, be sure to review the output for anything you may not want to share in public, and redact as appropriate.
What about a debug option like -d? Where is the simplicity? This is a project to provide convenience to users...
These two do not really combine well, and is not convenient to the user: "If you are unable to do so yourself", and "please attach the generated debugging output in set -x mode copy-pasted to a separate, attached file in the report. Before doing so, be sure to review the output for anything you may not want to share in public, and redact as appropriate".
Anyhow the issue did not occur with this package but with yay.
There is already a debug option set -x. There is no simplicity. This is not a project to provide infinite convenience to users. There's always a trade-off between the simplicity in the user interface and the simplicity in the codebase because we don't have infinite human resources. We need to assume a certain level of minimum knowledge from users who report bugs and issues.
Those two clauses shouldn't be combined because, in English, "do so" in "if you are unable to do so" should apply to the previous part, but not to the next part. Here, "do so" represents "fixing the problem" immediately before "if you are ...". Even if those two sentences were combined, they hardly lead to the conclusion "You are expecting users to find a debug error within the countless debug lines".
The error message "warning: command substitution: ignored null byte in input" is caused by the yay completion's bug that yay -Pc produces garbage. In retrieving the package list, yay forgets to unzip the contents obtained from https://aur.archlinux.org/packages.gz in this function; yay tries to split the contents of the binary packages.gz with newlines.
The yay issue seems to have been fixed in https://github.com/Jguer/yay/pull/2710 recently, and yay-12.5.3 includes the fix. You can update yay to the latest version and run yay -Pcc.
This is not a project to provide infinite convenience to users. There's always a trade-off between the simplicity in the user interface and the simplicity in the codebase because we don't have infinite human resources.
I do not understand. The project is aiming towards simplicity in the codebase, yet more than one-fifth of the lines in bash_completion are commented describing former deprecations within the code. Can this not be stored to only the repository, instead of storing an excess 36 KiB for all who have the package installed?
As for user interface issues, the user is expected to refer here; there is no other documented way of troubleshooting.
The
yayissue seems to have been fixed in Jguer/yay#2710 recently, andyay-12.5.3includes the fix. You can updateyayto the latest version and runyay -Pcc.
Indeed, it has been fixed; carefully reading, the issue is also resolved here.
Let's open a new discussion or issue (or a few, if needed) concerning everything else besides the null byte in input, so they can be appropriately tracked, thanks. Closing this one as it's not something for us to address.