bash-completion icon indicating copy to clipboard operation
bash-completion copied to clipboard

warning: command substitution: ignored null byte in input

Open x0341 opened this issue 5 years ago • 5 comments

after installing bash-completion I started to have this.

x0341 avatar Dec 12 '20 15:12 x0341

when doing the bash prompt completion (with tabs) -

"warning: command substitution: ignored null byte in input"

x0341 avatar Dec 12 '20 15:12 x0341

Please follow the instructions in README.md's Troubleshooting section.

scop avatar Dec 14 '20 05:12 scop

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?

Bill-Joe-Tech avatar Nov 28 '25 19:11 Bill-Joe-Tech

I think you should carefully read the Troubleshooting section once again.

akinomyoga avatar Nov 29 '25 01:11 akinomyoga

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 -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.

scop avatar Nov 29 '25 09:11 scop

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.

Bill-Joe-Tech avatar Dec 07 '25 23:12 Bill-Joe-Tech

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.

akinomyoga avatar Dec 07 '25 23:12 akinomyoga

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.

akinomyoga avatar Dec 07 '25 23:12 akinomyoga

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 yay issue seems to have been fixed in Jguer/yay#2710 recently, and yay-12.5.3 includes the fix. You can update yay to the latest version and run yay -Pcc.

Indeed, it has been fixed; carefully reading, the issue is also resolved here.

Bill-Joe-Tech avatar Dec 08 '25 02:12 Bill-Joe-Tech

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.

scop avatar Dec 08 '25 16:12 scop