Skip to content

Conversation

akinomyoga
Copy link
Collaborator

@akinomyoga akinomyoga commented May 21, 2023

Before applying _comp_compgen_split mentioned in #958 (comment), I would like to add the following fixes that are overlapping with it.

Only one element is specified to printf, so it just appends a newline.
However, the newline is anyway removed by the word splitting performed
by -W.  We can safely remove the modifications by printf '%s\n'.

Before commit 1d3add4, the argument specified to `printf` was not
quoted so that each word splitted by IFS is printed to an independent
line.  However, as IFS is $'\n' in this context, words are obtained by
splitting the result with newlines, so outputting them by printf
'%s\n' does not have any effects.

References:
scop@1d3add4#diff-efd1d1be37bc3e0c0b77e1a2d9ef05a7d9d7a09262b710adca23db163b18f387
Copy link
Owner

@scop scop left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants