Skip to content

Properly format \n for multiline messages#28

Open
Yeraze wants to merge 2 commits into
jnwatts:masterfrom
Yeraze:master
Open

Properly format \n for multiline messages#28
Yeraze wants to merge 2 commits into
jnwatts:masterfrom
Yeraze:master

Conversation

@Yeraze

@Yeraze Yeraze commented Sep 24, 2021

Copy link
Copy Markdown

No description provided.

@jnwatts

jnwatts commented Sep 24, 2021 via email

Copy link
Copy Markdown
Owner

@Yeraze

Yeraze commented Sep 24, 2021

Copy link
Copy Markdown
Author

Yea I started to revise the commit to pull out the config path :).

I thought it would work like you say, but in my testing it did not.. For example, when I tried to send the message "Test line 1\ntest line 2" it came through as a single line.. This fixed it. Does it work for you?

@jnwatts

jnwatts commented Sep 25, 2021 via email

Copy link
Copy Markdown
Owner

@Yeraze

Yeraze commented Sep 25, 2021

Copy link
Copy Markdown
Author

Ah, I see... Well I'm using bash, but my main use case for this script is connecting it to tools such as nagios, octopi, and apcupsd to send events.

@jnwatts

jnwatts commented Sep 25, 2021 via email

Copy link
Copy Markdown
Owner

@Yeraze

Yeraze commented Sep 25, 2021 via email

Copy link
Copy Markdown
Author

@jnwatts

jnwatts commented Sep 25, 2021 via email

Copy link
Copy Markdown
Owner

@Yeraze

Yeraze commented Sep 25, 2021

Copy link
Copy Markdown
Author

Not trying to be argumentative, but do you really think there are a significant number of people passing \n through your script that actually want it printed raw as \n ? Just seems to be like converting it to a carriage return would be the obvious preferred output.

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