mirror of
https://github.com/pyenv/pyenv.git
synced 2025-11-13 13:53:53 -05:00
In systems that use the MAWK interpreter (the default AWK installed with Ubuntu), the output of `rbenv help <command>` would have no line breaks. The issue is fixed by changing `gsub` to `sub` in the snippet of awk commands that are used to extract documentation comments. I suspect the bug is something to do with the way the '^' and '$' characters are interpreted by different AWK interpreters (per-line vs per-string anchors). If I understand correctly, the purpose of trim() is to remove all line breaks from the start and end of each sections of a command's documentation, in which case `sub` should serve the same purpose.