Skip to content

Properly format \n for multiline messages#28

Open
Yeraze wants to merge 2 commits intojnwatts:masterfrom
Yeraze:master
Open

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

Conversation

@Yeraze
Copy link

@Yeraze Yeraze commented Sep 24, 2021

No description provided.

@jnwatts
Copy link
Owner

jnwatts commented Sep 24, 2021 via email

@Yeraze
Copy link
Author

Yeraze commented Sep 24, 2021

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
Copy link
Owner

jnwatts commented Sep 25, 2021 via email

@Yeraze
Copy link
Author

Yeraze commented Sep 25, 2021

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
Copy link
Owner

jnwatts commented Sep 25, 2021 via email

@Yeraze
Copy link
Author

Yeraze commented Sep 25, 2021 via email

@jnwatts
Copy link
Owner

jnwatts commented Sep 25, 2021 via email

@Yeraze
Copy link
Author

Yeraze commented Sep 25, 2021

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