Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bash shebang wrapped incorrectly #129

Closed
jdghunt opened this issue Feb 18, 2019 · 2 comments
Closed

Bash shebang wrapped incorrectly #129

jdghunt opened this issue Feb 18, 2019 · 2 comments

Comments

@jdghunt
Copy link

jdghunt commented Feb 18, 2019

If I code the following bash script

#!/bin/bash
# A comment about this script which is longer than my maximum line width, which is set to 80 characters.

echo "hello"

then put the cursor on the second line (i.e. in the real comment line) and press alt-q to reflow the wrapping, I get the following:

#!/bin/bash A comment about this script which is longer than my maximum line
# width, which is set to 80 characters.

echo "hello"

i.e. the shebang line no longer works.

I would expect Rewrap to do the following:

#!/bin/bash
# A comment about this script which is longer than my maximum line width, which
# is set to 80 characters.

echo "hello"

Please can Rewrap be made to understand that the shebang line is a special comment which shouldn't be wrapped? Thanks. This is a minor annoyance in what's otherwise a great tool.

stkb added a commit that referenced this issue Feb 7, 2022
@stkb
Copy link
Owner

stkb commented Feb 7, 2022

This is now fixed in pre-release version 17.6.

@stkb stkb added the in pre-release version Is in pre-release version but not in stable yet label Feb 7, 2022
stkb added a commit that referenced this issue Feb 14, 2022
stkb added a commit that referenced this issue Feb 14, 2022
- Support .rmd files as markdown (#245)
- Basic support for Textile files as markdown (#271)
- Support FIDL (#255), Pascal/Delphi (#97) & pylintrc files (#121)
- Shell script: Ignore shebangs (#129)
- Add '//'-comments to CSS (workaround for #309)
- Fix batch files: case-insensitive "REM" and "@" prefix (#313)
- Fix the document being 'modified' if there were no actual changes
  (#308, #315)
@stkb
Copy link
Owner

stkb commented Feb 14, 2022

Now also in stable v1.16.2

@stkb stkb closed this as completed Feb 14, 2022
@stkb stkb removed the in pre-release version Is in pre-release version but not in stable yet label Feb 14, 2022
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

No branches or pull requests

2 participants