[Geany-Users] Bash Script Line Endings - Convert to LF for Unix Automatically When Detected?

Lex Trotman elextr at xxxxx
Wed Dec 7 02:58:26 UTC 2016


On 7 December 2016 at 11:21, Matthew Brush <mbrush at codebrainz.ca> wrote:
> On 2016-12-06 05:15 PM, OwN-3m-All wrote:
>>
>> Hi All,
>>
>> Would it be possible for Geany to automatically set the line endings
>> to LF for Unix when working with bash scripts?  I would suggest that
>> if a file is detected as a bash script, the line ending setting should
>> be automatically changed to LF.  Also, if the extension is .sh, I
>> would also like the line ending mode to be set to LF automatically.
>>
>> I have been burned so many times since I sometimes write my scripts in
>> Windows depending on which computer I am using.  Since bash scripts do
>> not run on Windows, they should probably always be converted to LF
>> line endings.
>>
>
> Are you sure Bash for Windows[0][1][2][3] doesn't support CRLF line endings?
>
> It might be better to do this as a Geany (or GeanyPy) plugin.

Agree with Matthew its not a default setting, its something a user
should set.  Unfortunately line endings are not settings you can set
in a filetype specific manner, but somebody could provide a pull
request for that.

Cheers
Lex

>
> Regards,
> Matthew Brush
>
> [0]: https://sourceforge.net/p/msys2/wiki/MSYS2%20introduction/
> [1]: https://www.cygwin.com/
> [2]: https://git-for-windows.github.io/
> [3]:
> http://www.windowscentral.com/how-install-bash-shell-command-line-windows-10
>
> _______________________________________________
> Users mailing list
> Users at lists.geany.org
> https://lists.geany.org/cgi-bin/mailman/listinfo/users


More information about the Users mailing list